Running a NGINX server on Ubuntu 22.04
Port 80 is OPEN, checked with sudo netstat -ntlp
I’ve checked every other post on stack overflow, tried everything that has been mentioned, and nothing has fixed my issue. Any help would be greatly appreciated.
Config file:
server{
listen 80;
listen [::]:80;
root /var/www/(website name)/html;
index index.html index.htm index.nginx-debian.html;
server_name: (website name);
location / {
try files $uri $uri/ = 404;
}
}
ufw app list:
Available applications:
Nginx Full
Nginx HTTP
Nginx HTTPS
OpenSSH
So far, I’ve tried (or already did):
Opened port 80 (already open)
Changing config file to:
server {
server_name domain.com www.domain.com;
return 200 "it works";
}
Adding “index index.html” to location/ block
Other things that I cannot name off the top of my head, but more editing config file, opening ports, and changing restarting Nginx too many times.
user24941915 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.