Page 1 of 1

Nginx configured but not working

Posted: Thu Jan 07, 2021 12:25 pm
by hazhayder
Hello, I have VestaCP installedon my server with nginx and I want one of my website to served through nginx to an application running on a port.
Now that I see that nginx is perfectly configured but still the website is using apache which it should not. The page shows vesta 403 forbidden page

Code: Select all

server {
    listen  80;
    server_name aljabbalcorporation.com www.aljabbalcorporation.com;

    location / {
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;
        proxy_pass http://localhost:5001/;
    }
}


Re: Nginx configured but not working

Posted: Thu Jan 07, 2021 1:46 pm
by grayfolk
hazhayder wrote:
Thu Jan 07, 2021 12:25 pm
Hello, I have VestaCP installedon my server with nginx and I want one of my website to served through nginx to an application running on a port.
Now that I see that nginx is perfectly configured but still the website is using apache which it should not. The page shows vesta 403 forbidden page

Code: Select all

server {
    listen  80;
    server_name aljabbalcorporation.com www.aljabbalcorporation.com;

    location / {
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;
        proxy_pass http://localhost:5001/;
    }
}

First check if your app on 5001 working.

Re: Nginx configured but not working

Posted: Fri Jan 08, 2021 6:57 pm
by hazhayder
grayfolk wrote:
Thu Jan 07, 2021 1:46 pm
hazhayder wrote:
Thu Jan 07, 2021 12:25 pm
Hello, I have VestaCP installedon my server with nginx and I want one of my website to served through nginx to an application running on a port.
Now that I see that nginx is perfectly configured but still the website is using apache which it should not. The page shows vesta 403 forbidden page

Code: Select all

server {
    listen  80;
    server_name aljabbalcorporation.com www.aljabbalcorporation.com;

    location / {
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;
        proxy_pass http://localhost:5001/;
    }
}

First check if your app on 5001 working.
It's working absolutely fine.