server { listen 8080; server_name localhost; root /var/www/html; index index.php index.html; charset utf-8; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_param PHP_VALUE "upload_max_filesize = 50M \n post_max_size = 50M"; } location ~ /\.ht { deny all; } location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|webp|woff|woff2|ttf|eot)$ { expires 30d; add_header Cache-Control "public, immutable"; } }