Created
May 6, 2018 19:47
-
-
Save mikelittle/dfb570c0707f2d135bdf36be2d6c9d28 to your computer and use it in GitHub Desktop.
Proxy another WordPress site as a subdirectory
This file contains 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
location /blog/ { | |
location ~ \.php$ { | |
rewrite ^/blog(.*) $1 break; | |
add_header X-url $1; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $host; | |
proxy_pass https://127.0.0.1:8023; | |
} | |
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jp | |
rewrite ^/blog(.*) $1 break; | |
add_header "Access-Control-Allow-Origin" "*"; | |
access_log off; | |
log_not_found off; | |
expires max; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $host; | |
proxy_pass https://127.0.0.1:8023; | |
} | |
rewrite ^/blog(.*) $1 break; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $host; | |
proxy_pass https://127.0.0.1:8023; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment