My Config Code:
<code>http{
# HTTP Server
server {
listen 80;
server_name _;
location /app1/ {
rewrite ^/app1/(.*) /$1 break;
proxy_pass http://192.168.178.201;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
sub_filter_types text/css application/javascript;
sub_filter '/assets/' '/app1/assets/';
sub_filter '/images/' '/app1/images/';
sub_filter_once off;
}
}
}
</code>
<code>http{
# HTTP Server
server {
listen 80;
server_name _;
location /app1/ {
rewrite ^/app1/(.*) /$1 break;
proxy_pass http://192.168.178.201;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
sub_filter_types text/css application/javascript;
sub_filter '/assets/' '/app1/assets/';
sub_filter '/images/' '/app1/images/';
sub_filter_once off;
}
}
}
</code>
http{
# HTTP Server
server {
listen 80;
server_name _;
location /app1/ {
rewrite ^/app1/(.*) /$1 break;
proxy_pass http://192.168.178.201;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
sub_filter_types text/css application/javascript;
sub_filter '/assets/' '/app1/assets/';
sub_filter '/images/' '/app1/images/';
sub_filter_once off;
}
}
}
I am confuised, all files ar getting 200 and loading, the log on the Backend is looking also good, but i dont see the index page
Example
192.168.178.88 is proxy
192.168.178.88/app1 is “index” for app1
192.168.178.201 is index for backend
192.168.178.88/app1/ is showing 192.168.178.201/randomstuffnotinDOM
What i am doing wrong?