root /usr/share/wordpress; index index.php; location /wp-content/ { alias /srv/www/wp-content/$host/; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; } #deny access to .htaccess files, if Apache's document root #concurs with nginx's one location ~ /\.ht { deny all; } location /files { rewrite ^/files/(.+) /wp-includes/ms-files.php?file=$1 break; } location / { if (-e $request_filename){ rewrite ^(.*)$ /index.php break; } }