#user nobody;
worker_processes 10;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
events {
worker_connections 1024;
}
# http conf
http {
#include http/common.conf;
#include http/cache.conf;
#include http/resty.conf;
#include http/mime.types;
include http/*.conf;
include http/servers/*.conf;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$request_filename"';
access_log logs/access.log main;
#charset koi8-r;
#access_log logs/host.access.log main;
server{
listen 8090;
server_name 192.168.137.2;
ssl on;
#从腾讯云获取到的第一个文件的全路径
ssl_certificate /etc/ssl/server.pem;
ssl_certificate_key /etc/ssl/server.key;
location / {
#gzip on;
alias /var/www/html/;
index index.html index.htm;
}
location /lua {
default_type text/html;
content_by_lua '
ngx.say("User-Agent:",ngx.req.get_headers()["User-Agent"])
';
}
}
}