Welcome! Log In Create A New Profile

Advanced

nginx can't create virtual host on port 8080

Posted by salimsaid 
nginx can't create virtual host on port 8080
November 19, 2020 04:34AM
Am running `nginx version: nginx/1.19.2 (Ubuntu)` ,

I've set a virtual host for my domain on port 8080 , below is how the virtual host looks like

server {
listen 8080;
#listen example.com:8080;
server_name example.com www.example.com *.example.com;

location / {
root /var/www/example.com;
index index.html index.htm;
}
}

i've defined the virtual host inside the main nginx configuration file i.e. `nginx.conf`

When i try to access example.com:8080 , the page returns 522 timeout status

8080 is allowed in firewall, i've tried almost everything, i even built nginx from source but still no luck.

When i tail error logs after the page times out, nothing gets logged. N.B i compiled nginx with the `--with-debug` flag to enable logging of almost everything, but still nothing shows up on the logs.

What am i doing wrong ?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 74
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready