server { listen 8080 default_server; listen [::]:8080 default_server; root /var/www/html; location / { try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { include fastcgi.conf; fastcgi_pass ; } access_log /dev/stdout; error_log /dev/stdout; # You may need this to prevent return 404 recursion. location = /404.html { internal; } }