Created
November 7, 2012 09:54
-
-
Save scribu/4030509 to your computer and use it in GitHub Desktop.
nginx config for multisite in a subdirectory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# site path: /var/www/wp.dev/ | |
# wp path: /var/www/wp.dev/core/ | |
# site url: http://wp.dev/core/ | |
# wp url: http://wp.dev/core/ | |
upstream php { | |
server unix:/var/run/phpfpm.sock; | |
} | |
server { | |
server_name wp.dev; | |
root /var/www/wp.dev; | |
access_log /var/log/nginx/wp.dev-access.log; | |
error_log /var/log/nginx/wp.dev-error.log; | |
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