Change Secure Web Server Port

My Internet provider blocks port 443, the default port for HTTPS. So in my firewall I forwarded an open external port to the internal port number 443. This works, but any URLs created on the server are missing the port number, and don’t work.

Is there a way to change the port that NGINX is listening to for HTTPS?

Thank you,

Elliott

What a shitty ISP you got :stuck_out_tongue:

Anyway, you have to edit every configuration file in /etc/nginx/conf.d and change every listen 443 to your port number.

Thank you very much for your response kload. You are right that the ISP is shitty. Thankfully it is just a temporary situation.

Sadly this solution is not working for me, here is what I did:

Logged into the server as admin using SSH.
cd /etc/nginx/conf.d
sudo nano myDomain.conf
Changed 443 to my new port.
/etc/init.d/nginx restart
In the admin web page I opened the new port.

I then browsed to myDomain:newPort. The server did respond, just like before when I forwarded the port. But it is still not writing URLs correctly on the server side.

For now I am going to use this server internally to test new apps that YunoHost has, that I have not used before. When I get a better ISP, I will work on this server again. Thank you again.