server { listen 80; index index.php index.html index.htm; root /usr/share/nginx/html; error_page 404 /index.php; location ~ \.php$ { fastcgi_param REQUEST_METHOD $request_method; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location / { root /usr/share/nginx/html; try_files $uri /index.php; } }