server { listen 80; listen [::]:80; root "/var/www/vHOST"; server_name vHOST; index index.html index.php; client_max_body_size 2G; rewrite ^/wp-json/.*$ index.php$uri last; location ~ ^/.*/$ { try_files $uri $uri/ /index.php?$uri; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php(/|$) { include fastcgi.conf; fastcgi_param SCRIPT_FILENAME "/var/www/vHOST/$fastcgi_script_name"; # With php7.0-cgi alone: # fastcgi_pass 127.0.0.1:9000; # With php7.0-fpm: fastcgi_pass unix:/run/php/php7.0-fpm.sock; } }