This commit is contained in:
sotos
2025-12-08 09:45:23 +01:00
parent 508f1a46b2
commit 4e92a6d6f3
8 changed files with 31 additions and 58 deletions

View File

@@ -1,40 +1,29 @@
worker_processes auto;
events {
worker_connections 1024;
}
worker_processes 1;
events { worker_connections 1024; }
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
client_max_body_size 100M;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Snake game server
server {
listen 80;
server_name localhost;
root /var/www/html;
index index.php index.html index.htm;
server_name _;
location / {
try_files $uri $uri/ /index.php?$args;
root /usr/share/nginx/html;
index index.html;
}
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# Metrics for Prometheus
server {
listen 81;
server_name _;
location ~ /\.ht {
location /nginx_status {
stub_status;
allow 0.0.0.0/0; # adjust for security; or restrict to your Prometheus server
deny all;
}
}