nginx proxy_pass problem with "no root" content
-
Dear all,
i have the following problem.
i have installed 2 blogs on a dedicated server (blog only). the blogs are installed in the folder
– /var/www/blog/en
– /var/www/blog/dethe blogs are called via proxy_pass from an other server. Therefore i have introduced the 2 subdomains.As you can see here:
https://www.twago.com/blog
https://www.twago.de/blogthe problem is for all content that is not coming from the database like images etc. or also /wp-admin/ call the subdomain is used. if you look at the sourcecode of the page for all folders below /blog/de the subdomain is in the link and not https://www.twago.com/blog… i dont know what to do.
Heres my nginx – config from the server thats calling the proxy_pass:
…
location /blog/ {
# If logged in, don’t cache.
if ($http_cookie ~* “comment_author_|wordpress_(?!test_cookie)|wp-postpass_” ) {
set $do_not_cache 1;
}
proxy_cache_key “$scheme://$host$request_uri $do_not_cache”;proxy_pass_header Set-Cookie;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;#sub_filter_once off;
sub_filter ‘blog-en.twago.com’ ‘www.twago.com/blog’;
proxy_pass https://80.237.207.10;
}
…my nginx settings on the dedictated blog server
server {
listen 80.237.207.10:80;
server_name blog-en.twago.com;location / {
root /var/www/blog/en;
index index.php;if (!-e $request_filename) {
rewrite ^.+/?(/wp-.*) $1 last;
rewrite ^.+/?(/.*\.php)$ $1 last;
rewrite ^(.+)$ /index.php?q=$1 last;
}…
Thanks already!
- The topic ‘nginx proxy_pass problem with "no root" content’ is closed to new replies.