error_log logs/error.log error; pid logs/nginx.pid; worker_processes auto; worker_rlimit_nofile 51200; events { worker_connections 3600; multi_accept on; } http { map 0 $BaseRoot { default "D:/Qampp/htdocs"; } include mime.types; default_type text/html; charset utf-8; server_names_hash_bucket_size 512; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 50m; sendfile on; tcp_nopush on; keepalive_timeout 60; tcp_nodelay on; gzip on; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 256k; fastcgi_intercept_errors on; autoindex on; autoindex_format html; # html | xml | json | jsonp; autoindex_exact_size on; autoindex_localtime on; access_log off; index index.php index.html index.htm index.shtml index.lua; add_header Nginx "Qampp - Nginx - $remote_addr"; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; lua_package_path "$prefix../htdocs/?.lua;;"; lua_package_cpath "$prefix../htdocs/?.so;;"; server { listen 127.0.0.100:88; server_name localhost; location / { proxy_pass http://127.0.0.1:8080; index index.jsp index.html index.htm; } } server { listen 127.0.0.10:88; server_name localhost; root $BaseRoot; allow 127.0.0.1; deny all; location /luainfo { content_by_lua ' local info = require "resty.info" info()'; } location / { set $isrewrite 0; if (!-e $request_filename) { set $isrewrite 1; } if (-e "$document_root/index.php") { set $isrewrite "$isrewrite 1"; } if ($isrewrite = "1 1"){ rewrite ^/(.*)$ /index.php?$1 last; return 403; } try_files $uri $uri/ /index.php$is_args$args; } include default_location.conf; } include server/*.conf; # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} }