Hi.
I am fighting with my nginx config.
What I will do:
I have got some docker stacks (php, mysql, nginx, ... ) wich are available in my browser by localhost:[port]
Now I would like to make a config for each domain to forward it to a specific port on localhost.
my-domain (which is on Port 80) to localhost:8080
/etc/host
127.0.0.1 my-domain
nginx is configured as a vhost for all of my domains in
/etc/nginx/sites-enabled/proxy.conf
like this
/etc/nginx/sites-enabled/proxy.conf
server {
listen 80;
server_name my-domain;
location / {
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:40000;
proxy_redirect off;
}
}
If i call localhost:40000 in my browser I get the portainer login of the docker container I would like to load.
If I call myomain in my browser, I only the the nginx default index page.
Any hints?
Regards
D from D