WordPress nginx config

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;
}
}

3 thoughts on “WordPress nginx config”

  1. I just like the helpful information you provide for your articles.

    I’ll bookmark your weblog and check again here frequently.
    I’m somewhat certain I’ll be informed plenty of new stuff proper here!
    Best of luck for the next!

  2. You have made some good points there. I looked on the internet for additional information about the issue and found
    most individuals will go along with your views on this
    website.

  3. Great post, I believe website owners should learn a lot from
    this web blog its really user genial. So much wonderful
    information on here :D.

Leave a Reply

Your email address will not be published. Required fields are marked *