docker-ubuntu-vnc-desktop icon indicating copy to clipboard operation
docker-ubuntu-vnc-desktop copied to clipboard

Change nginx port ?

Open carlocorradini opened this issue 3 years ago • 9 comments

There is a possibility to change the listening port of the nginx server?

Use case: Another web server running with default port 80/443

Thanks!!!

carlocorradini avatar Apr 23 '21 12:04 carlocorradini

Hi, the service runs on port 80 within the docker container. Simply map the port on your local computer to a different port, like 6080 in the example: docker run -p 6080:80 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc Now you can continue to use port 80 on your local computer.

worldworm avatar Apr 23 '21 13:04 worldworm

Hi, the service runs on port 80 within the docker container. Simply map the port on your local computer to a different port, like 6080 in the example: docker run -p 6080:80 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc Now you can continue to use port 80 on your local computer.

The "custom" web-server is running within the same docker container.

So the idea is to use the port 80 & 443 for the web-server and another one for nginx.

carlocorradini avatar Apr 23 '21 14:04 carlocorradini

Hi, the service runs on port 80 within the docker container. Simply map the port on your local computer to a different port, like 6080 in the example: docker run -p 6080:80 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc Now you can continue to use port 80 on your local computer.

Thanks for your help!

carlocorradini avatar Apr 23 '21 14:04 carlocorradini

@carlocorradini Re-opened by accident?

dennisvanderpool avatar Apr 23 '21 16:04 dennisvanderpool

@carlocorradini Re-opened by accident?

Closed by accident, sorry

carlocorradini avatar Apr 23 '21 17:04 carlocorradini

Can you try to modify your nginx config file in your docker file? https://ubiq.co/tech-blog/change-nginx-port-number-ubuntu/

dennisvanderpool avatar Apr 23 '21 17:04 dennisvanderpool

Can you try to modify your nginx config file in your docker file? https://ubiq.co/tech-blog/change-nginx-port-number-ubuntu/

Yep, but what do you think if we can mofidy it directly with an ARG (maybe)?

carlocorradini avatar Apr 23 '21 17:04 carlocorradini

@carlocorradini Did some research, doesn't seem possible by default. But you could take in parameter and put it in config before starting nginx.

dennisvanderpool avatar Apr 23 '21 18:04 dennisvanderpool

@carlocorradini Did some research, doesn't seem possible by default. But you could take in parameter and put it in config before starting nginx.

So using: https://ubiq.co/tech-blog/change-nginx-port-number-ubuntu/

Is the only way (currently) to change the nginx configuration?

Thanks for your help!

carlocorradini avatar Apr 23 '21 18:04 carlocorradini