# Change Secure Web Server Port

**URL:** https://forum.yunohost.org/t/change-secure-web-server-port/145
**Category:** Support
**Tags:** english
**Created:** [November 16, 2014, 12:12am UTC](https://forum.yunohost.org/t/change-secure-web-server-port/145 "2014-11-16T00:12:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Elliott](https://forum.yunohost.org/user_avatar/forum.yunohost.org/elliott/32/31_2.png) [@Elliott](https://forum.yunohost.org/u/Elliott)
#### Post date: [November 16, 2014, 12:12am UTC](https://forum.yunohost.org/t/change-secure-web-server-port/145/1 "2014-11-16T00:12:34Z")

</div>

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

---

<div class="post-metadata">

### Author: ![kload](https://forum.yunohost.org/user_avatar/forum.yunohost.org/kload/32/100_2.png) [@kload](https://forum.yunohost.org/u/kload)
#### Post date: [November 17, 2014, 12:21pm UTC](https://forum.yunohost.org/t/change-secure-web-server-port/145/2 "2014-11-17T12:21:46Z")

</div>

What a shitty ISP you got 😛

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

---

<div class="post-metadata">

### Author: ![Elliott](https://forum.yunohost.org/user_avatar/forum.yunohost.org/elliott/32/31_2.png) [@Elliott](https://forum.yunohost.org/u/Elliott)
#### Post date: [November 19, 2014, 2:59am UTC](https://forum.yunohost.org/t/change-secure-web-server-port/145/3 "2014-11-19T02:59:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [January 18, 2023, 8:07pm UTC](https://forum.yunohost.org/t/change-secure-web-server-port/145/4 "2023-01-18T20:07:52Z")

</div>


