有什么做ppt的網(wǎng)站嗎國家培訓網(wǎng)官網(wǎng)
可以參考《Linux學習之Ubuntu 20.04在https://openresty.org下載源碼安裝Openresty 1.19.3.1,使用systemd管理OpenResty服務》安裝Openresty。
然后把下邊的內(nèi)容寫入到openresty配置文件/usr/local/openresty/nginx/conf/nginx.conf
(根據(jù)實際情況進行選擇文件):
worker_processes 1;
events {worker_connections 1024;
}
http {include mime.types;default_type application/octet-stream;sendfile on;keepalive_timeout 65;server {listen 80;server_name localhost;location /lua {default_type text/html;content_by_lua '
ngx.say("User-Agent: ",ngx.req.get_headers()["User-Agent"])
';}location / {root html;index index.html index.htm;}error_page 500 502 503 504 /50x.html;location = /50x.html {root html;}}
}
然后sudo openresty
啟動openresty。
最后在瀏覽器里邊輸入ip/lua
就可以顯示出來效果了。
此文章為10月Day 10學習筆記,內(nèi)容來源于極客時間《Nginx 核心知識 150 講》