I have this situation. Current VM where this nginx config is stored has a valid ssl certificate. Inside this VM is the main application app1
served in port 80. On another port 1234 another service is served app2
in a docker container. I managed to reverse proxy app2
like this
location /app2/ {
proxy_pass http://127.0.0.1:1234/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 600s;
proxy_redirect http://127.0.0.1:3888/ http://127.0.0.1:8080/vnc/;
proxy_set_header Host $http_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-Protocol $scheme;
}
app2
can be accessed by https://mywebsite.com/app2
Now I have a Laravel app in another VM app3
(not in a docker container). I did the same procedure. When I go to https://websited.com/app3 it only loads the html part but not javascript and css. The error on mozilla console shows as
Blocked loading mixed active content “http://mywebsite.com/css/style.css”
As I understand it should look inside the resources of the VM that app3
is stored.
How do I make the nginx to load app3
resources like js and css?