Categories
Uncategorized

Nginx on custom ports

This configuration is actual one on server/machine, hop, on my network. And it is live.

How to use custom ports on NGINX?

Add all IPs:

server { 
....
listen 5085 default_server http2;
listen [::]:5086 default_server http2 ssl;
listen 192.*:5086 http2 ssl;
listen [2600:1700:a*:8*:2*:b*:f*:f*]:5086 http2 ssl;
server_name hop.a1z.us www.hop.a1z.us;
....
}

server {
....
server_name nginx.hop.a1z.us www.nginx.hop.a1z.us;
listen 5087;
listen 192.*:5087;
listen [*]:5087;
....
listen 192.*:5088 ssl http2;
listen [*]:5088 ssl http2;
listen [::]:5088 http2 ssl;
....
}

Did not work until I added all the IPs including local and ip6!

By A1Z Hosting

Hosting, Design, and Development

Leave a Reply