server { listen 80; client_max_body_size 4096M; client_body_buffer_size 4096M; index index.html index.php; location / { index index.html; root /var/www/html; #Implementing PHP pseudo static try_files $uri /index.php?$args; } # You may need this to prevent return 404 recursion. location = /404.html { internal; } #Add PHP support location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name; include fastcgi_params; } }