Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

ssl error vestacp installation

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
15 posts
  • Previous
  • 1
  • 2
mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: ssl error vestacp installation
  • Quote

Post by mehargags » Sun Sep 24, 2017 8:47 am

acquirersam wrote:first used vestagui which did not work (only port 8083 works not 433). found in letsencrypt forum to clean certificate using command. then tried using certbot and manually pasted it in vesta gui. same thing happens. no difference :(
If you have a valid Certificate files stored already or if that is working for VestaCP, you can retrieve it from /usr/local/vesta/ssl

and the paste the certificate values manually in
/home/<user>/conf/web<domain>.xxx (there are 3-4 files like .cert . pem. .ca .key
Top

acquirersam
Posts: 6
Joined: Sat Sep 23, 2017 9:09 am

Re: ssl error vestacp installation
  • Quote

Post by acquirersam » Sun Sep 24, 2017 9:36 am

well, i tried and it does not help, now i installed a light gui in werver to check the problem and i could see that https is working in the server. its strange. i used firefox to navigate to my site and it works but outside my server it does not work. i disabled all firewall systems to check. but the same thing happens.

now again a strange problem happens when i did

Code: Select all

sudo service vesta restart
I receive the error:
Restarting vesta-nginx vesta-nginx
nginx [emerg] "server" directive is not allowed here in /usr/local/vesta/nginx/conf/nginx.conf:1
i am cracking my head here. the nginx.conf in the said location is below:

Code: Select all

server {
    listen      192.168.1.2:80;
    server_name ****************************;
    error_log  /var/log/apache2/domains/***************************.error.log error;

    location / {
        proxy_pass      http://192.168.1.2:8080;
        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {
            root           /home/admin/web/*********************/public_html;
            access_log     /var/log/apache2/domains/*********************.log combined;
            access_log     /var/log/apache2/domains/**********************.bytes bytes;
            expires        max;
            try_files      $uri @fallback;
        }
    }

    location /error/ {
        alias   /home/admin/web/***********************/document_errors/;
    }

    location @fallback {
        proxy_pass      http://192.168.1.2:8080;
    }

    location ~ /\.ht    {return 404;}
    location ~ /\.svn/  {return 404;}
    location ~ /\.git/  {return 404;}
    location ~ /\.hg/   {return 404;}
    location ~ /\.bzr/  {return 404;}

    include /home/admin/conf/web/nginx.***********************.conf*;
}
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: ssl error vestacp installation
  • Quote

Post by mehargags » Sun Sep 24, 2017 9:40 am

check carefully,
if there is an orphan text 'server' in the starting of the config somewhere. Or rebuild web to check it once again.

For the SSL config, you can PM me your server details - SSH and domain name in question... plus the LE certificate that you already have. I'll check it myself
Top

acquirersam
Posts: 6
Joined: Sat Sep 23, 2017 9:09 am

Re: ssl error vestacp installation
  • Quote

Post by acquirersam » Sun Sep 24, 2017 10:32 am

ok, i solvedit by replacing the nginx.conf with older one which i took backup before trying fix for ssl problem. now everything works.no problem.

but still the ssl not working. works only in the server machine.

It was previously not working in the server machine also. I modified hosts file (/etc/hosts) in the server to domain.tld and http://www.domain.tld and pointed it to my local ipv4. now it works with ssl after apache and nginx restart.

but outside the server it is not working. please help.
Top

acquirersam
Posts: 6
Joined: Sat Sep 23, 2017 9:09 am

Re: ssl error vestacp installation
  • Quote

Post by acquirersam » Mon Sep 25, 2017 7:00 am

update:
I modified the apache config files in /home/admin/conf/web/ and /etc/apche/conf.d/ so that my apache server listens to localadress i.e., 127.0.0.1:8080 (for normal http) and 127.0.0.1:8083 (for ssl).
I also modified in nginx config files in /etc/nginx/conf.d/ and /home/admin/conf/web/ to point to apache in 127.0.0.1 Previously it was pointing to an ip address like 192.168.1.2 for both "listen" and "proxy handling".
now after config check and restarting both apache and nginx, the server works fine without an error for normal http requests. for ssl (port 443) i get the same error as mentioned in my previous posts.
i did a portcheck and following is the result:
> sudo netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 23145/apache2
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 23101/nginx.conf
tcp 0 0 127.0.0.1:8443 0.0.0.0:* LISTEN 23145/apache2
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 23101/nginx.conf
please help now. i think i am close now to solve the error.
Top


Post Reply
  • Print view

15 posts
  • Previous
  • 1
  • 2

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password