Page 1 of 1

Vesta on subdomain gets me empty response

Posted: Fri Aug 31, 2018 6:32 am
by eduardoroeder
Hi guys, been using vesta for a month now. Great job by the way.

So, I switched from beginning the default port from 8083 to 10000 (easier to remember) and it is all good. Now, on my office there is a firewall that blocks EVERYTHING except 80 and 443 (perhaps some other ports, but could not bother to search for them), so I started looking a way around acessing my web panel other than direct port.

This lead me to subdomain. After researching a little I found a way to implement it as a subdomain (and SSL, of course). Added an A subzone with my IP to my top domain, then added a nginx config file on the nginx config folder and it worked well. Until I tryied to do some actions inside the UI.

Whenever I try to restart nginx via the UI (to update the nginx changes)[even other options cause this. Nginx is just an example] it returns me an "ERR_EMPTY_RESPONSE" on chrome. I've been able to go to the subdomain (vesta.example.com) and start again, but whenever I try to do the same command it gives me the same empty response, but when I come to it again it shows me that nginx has restarted (the service uptime timer resets). So, the command is issued to the server but the server is giving me the empty response.

This is the code I used on nginx to make vesta acessible from subdomain.

Code: Select all

server {
    # nginx listens to this
    listen IP.IP.IP.IP:80;

    # the virtual host name of this
    server_name vesta.example.com;

    location / {
        rewrite ^(.*) https://vesta.example.com$1 permanent;
    }
}

upstream vestaback {
    # the vesta server
    server 127.0.0.1:10000;
    keepalive 64;
}

server {
    # nginx listens to this
    listen IP.IP.IP.IP:443;

    # the virtual host name of this
    server_name vesta.example.com;

    ssl         on;
    ssl_certificate      /home/admin/conf/web/ssl.example.com.pem;
    ssl_certificate_key  /home/admin/conf/web/ssl.example.com.key;
	
    location / {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass https://vestaback;
        proxy_http_version 1.1;
        proxy_pass_request_headers on;
        proxy_set_header Connection "keep-alive";
        proxy_store off;
    }
}


Whenever I enter via example.com:10000 with either http or https it works normally.

Any suggestion over here?

Thanks and keep up the good work.