| user root; |
| worker_processes auto; |
| pid /run/nginx.pid; |
| daemon off; |
|
|
| events { |
| worker_connections 768; |
| } |
|
|
| http { |
| sendfile on; |
| tcp_nopush on; |
| tcp_nodelay on; |
| keepalive_timeout 65; |
| types_hash_max_size 2048; |
|
|
| include /etc/nginx/mime.types; |
| default_type application/octet-stream; |
|
|
| client_body_temp_path /tmp/nginx_body 1 2; |
| proxy_temp_path /tmp/nginx_proxy; |
| fastcgi_temp_path /tmp/nginx_fastcgi; |
| uwsgi_temp_path /tmp/nginx_uwsgi; |
| scgi_temp_path /tmp/nginx_scgi; |
|
|
| access_log /var/log/nginx/access.log; |
| error_log /var/log/nginx/error.log; |
|
|
| server { |
| listen 8088; |
| server_name localhost; |
|
|
| root /home/www; |
| index index.php index.html; |
|
|
| location / { |
| try_files $uri $uri/ @opcode; |
| } |
|
|
| location ~ \.php$ { |
| try_files $uri =404; |
| include fastcgi_params; |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| fastcgi_pass unix:/run/php/php7.4-fpm.sock; |
| } |
|
|
| location @opcode { |
| proxy_pass http://127.0.0.1:8080; |
| proxy_set_header X-Real-IP $remote_addr; |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| proxy_set_header X-Forwarded-Host $host; |
| proxy_set_header X-Forwarded-Port 443; |
| proxy_set_header X-Forwarded-Proto https; |
|
|
| proxy_http_version 1.1; |
| proxy_set_header Upgrade $http_upgrade; |
| proxy_set_header Connection "upgrade"; |
| } |
| } |
| } |