interbrite / letsencrypt-vesta

Automate Let's Encrypt Certificate Installation for VestaCP
Other
217 stars 64 forks source link

HTTPD failed and all domain getting redirected to first ssl set up domain #22

Closed rebootcode closed 8 years ago

rebootcode commented 8 years ago

I have same issue as mentioned here https://github.com/interbrite/letsencrypt-vesta/issues/18 . Plus.

Now my all domains in same server is getting redirected to https site to domain which i setup letsencrypt for the first time.

To replicate the issue :-

  1. Install letsencrypt
  2. Run letsencrypt for first domain
  3. Run letsencrypt for second domain
  4. Run letsencrypt for third domain

Now all domain redirects to http://firstdomain

Server : Centos 6 Vesta CP latest 0.9.8

jpitoniak commented 8 years ago

Whithout seeing your server, it's hard to guess at exactly what's going on, but my guess would be that your /etc/nginx/nginx.conf file may have been corrupted (assuming you're using Nginx). There are some known bugs in the Vesta tools that manage that file.

The file should look something like this:

    include /home/admin/conf/web/nginx.conf;
    include /home/admin/conf/web/snginx.conf;
    include /home/user2/conf/web/nginx.conf;
    include /home/user2/conf/web/snginx.conf;
    include /home/user3/conf/web/nginx.conf;
    include /home/user3/conf/web/snginx.conf;

There should be at least one line for each user account that has websites configured in it on your server. If the account has any SSL-enabled sites on it there will be two lines for the it (nginx.conf for http and snginx.cong for https). "include" is case sensitive and must start with a lowercase "i," and each line must end with a semicolon.

rebootcode commented 8 years ago

Hi, I was about to update the issue.

Domain getting redirected to first SSL setup domain was because of httpd failed to restart.

In order to solve , I had to kill my all httpd running at port 8080, as it was creating issue on restart and than restarted httpd again. It started working perfectly.

root@server# lsof -i :8080

root@server# kill -SIGTERM <httpd_port_id_here>

roto@server# service httpd restart

Now, Everything is working fine :)

Thanks a lot for amazing script. :+1: