SteveLTN / https-portal

A fully automated HTTPS server powered by Nginx, Let's Encrypt and Docker.
MIT License
4.42k stars 296 forks source link

Different ports #284

Closed ifamirhasan closed 3 years ago

ifamirhasan commented 3 years ago

Hello I want to use different ports for example:

example.com -> http://php:80 example.com:8085 -> http://php:8085

but I could not achieve it by editing config files of nginx.

I will be appreciated if someone helps me.

SteveLTN commented 3 years ago

Hi,

There are two ports: 80 and 443 used. Unfortunately, you cannot change 80. Let's Encrypt enforces you to use port 80 to verify domain ownership. To replace 443 with something else, you can change Nginx config, (see this section). But I would probably just do it in Docker's config.

    ports:
      - '80:80'
      - '4433:443'
ifamirhasan commented 3 years ago

So I will try using another way instead of different ports. Thanks