Skip to content

Instantly share code, notes, and snippets.

@rorymcdaniel
Created February 23, 2017 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rorymcdaniel/e2ee4575de9781e60532a82ef6ca76f0 to your computer and use it in GitHub Desktop.
Save rorymcdaniel/e2ee4575de9781e60532a82ef6ca76f0 to your computer and use it in GitHub Desktop.
Nginx conf file to be placed in /etc/nginx/forge-conf/domainname/server/ on a Laravel Forge provisioned server
# THis is for WordPress subdirectory multsite
rewrite ^/(wp-.*.php)$ /wp/$1 last;
rewrite ^/(wp-(content|admin|includes).*) /wp/$1 last;
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) /wp$1 last;
rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ /wp$1 last;
}
~
~
~
~
~
~
~
~
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment