Why Nginx only responds on Port 80?

I tried to change port 80 to 81 in nginx.conf file but the sample site is not responding despite Listening to the 81 port. The example website only responds on port 80. May I know how can I run this nginx server on a different port than 80?

Nginx.conf file:

server {
	listen 81;
	listen [::]:81;

	root /var/www/samplesite.com;

	index index.html index.htm index.nginx-debian.html;

	server_name samplesite.com www.samplesite.com;

	location / {
		try_files $uri $uri/ =404;
	}

}

enter image description here

Not: ufw is inactive

More details here, https://developers.cloudflare.com/fundamentals/get-started/reference/network-ports/

http

  • 80
  • 8080
  • 8880
  • 2052
  • 2082
  • 2086
  • 2095

https

  • 443
  • 2053
  • 2083
  • 2087
  • 2096
  • 8443

With #security:spectrum you can proxy non-standard ports.

I have read but didn’t help me thanks. The weird is that ipadress:8080 is respond but domain is not responding expect if I use 80 port instead of any other such 8080 or 81.

Only the ports listed will work for proxied records - use Cloudflare Tunnels to map 80/443 to non-standard ports.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.