Skip to content

Instantly share code, notes, and snippets.



Created Nov 7, 2012
What would you like to do?
nginx config for multisite in a subdirectory
# site path: /var/www/
# wp path: /var/www/
# site url:
# wp url:
upstream php {
server unix:/var/run/phpfpm.sock;
server {
root /var/www/;
access_log /var/log/nginx/;
error_log /var/log/nginx/;
index index.html index.php;
rewrite ^/core/([_0-9a-zA-Z-]+)/(xmlrpc\.php|wp-[0-9a-z-]+\.php) /core/$2;
rewrite ^/core/([_0-9a-zA-Z-]+)/(wp-(admin|content|includes).*) /core/$2;
location / {
try_files $uri $uri/ /index.php;
location ~ \.php {
include /etc/nginx/fastcgi_params;
fastcgi_pass php;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment