We are starting CHRISTMAS Sale. Get 30% OFF on lifetime licenses with code: FYSKK72

Sites not avaible after reboot

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Holiday
Posts: 3
Joined: Wed Nov 15, 2017 10:02 am

Sites not avaible after reboot

Postby Holiday » Sat Nov 18, 2017 9:57 pm

Hello,

Each time i reboot the server my site are not working (but vesta pannel is ok), i have to execute the cli command "v-rebuild-user admin" in order to make things work again.

The only change i've mage recently is to create a new snginx template (based on the original but edited for a specific website).

Do you have any idea of what's wrong and how i can solve this?

Thanks for your time.

skamasle
Collaborator
Posts: 384
Joined: Mon Feb 29, 2016 6:36 pm

Re: Sites not avaible after reboot

Postby skamasle » Mon Nov 20, 2017 10:13 pm

Can you check if apache and nginx start after reboot ?
Patch your ubuntu 16 or mysq5.7 -> viewtopic.php?f=20&t=13239
Transfer accounts from cPanel -> viewtopic.php?f=19&t=11075

Holiday
Posts: 3
Joined: Wed Nov 15, 2017 10:02 am

Re: Sites not avaible after reboot

Postby Holiday » Mon Dec 18, 2017 12:29 pm

Sorry for the response delay (i have notifications on now).

From memory nginx and apache where started (it was the first thing i looked for). As i said, the command "v-rebuild-user" solves it till the next reboot. I think it's related to the custom nginx and apache templates i've made (to force the directory of one of the subdomain) because it works again after i run "v-rebuild-user". I will try tomorrow with the command "v-rebuild-web-domains" after restart but if you have some other tests for me to try, feel free to ask. (I have to run the tests early in the morning because i have to reboot the server to run the tests and it shuts the site down ).

apache template :

Code: Select all


<VirtualHost %ip%:%web_port%>

    ServerName %domain_idn%
    %alias_string%
    ServerAdmin %email%
    DocumentRoot /home/admin/web/mysite.fr/public_html
    ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
    Alias /vstats/ %home%/%user%/web/%domain%/stats/
    Alias /error/ %home%/%user%/web/%domain%/document_errors/
    #SuexecUserGroup %user% %group%
    CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
    CustomLog /var/log/%web_system%/domains/%domain%.log combined
    ErrorLog /var/log/%web_system%/domains/%domain%.error.log
    <Directory /home/admin/web/mysite.fr/public_html>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
    </Directory>
    <Directory %home%/%user%/web/%domain%/stats>
        AllowOverride All
    </Directory>

    <IfModule mod_ruid2.c>
        RMode config
        RUidGid %user% %group%
        RGroups www-data
    </IfModule>
    <IfModule itk.c>
        AssignUserID %user% %group%
    </IfModule>

    Include %home%/%user%/conf/web/%web_system%.%domain%.conf*

</VirtualHost>


nginx template is the same as the original (see below) because all i want is a common directory for my subdomain (but not logs). And it works perfectly on production since a couple of month (but not after restart apparently).

Code: Select all

server {
    listen      %ip%:%proxy_port%;
    server_name %domain_idn% %alias_idn%;
    error_log  /var/log/%web_system%/domains/%domain%.error.log error;

    location / {
        proxy_pass      http://%ip%:%web_port%;
        location ~* ^.+\.(%proxy_extentions%)$ {
            root           %docroot%;
            access_log     /var/log/%web_system%/domains/%domain%.log combined;
            access_log     /var/log/%web_system%/domains/%domain%.bytes bytes;
            expires        max;
            try_files      $uri @fallback;
        }
    }

    location /error/ {
        alias   %home%/%user%/web/%domain%/document_errors/;
    }

    location @fallback {
        proxy_pass      http://%ip%:%web_port%;
    }

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

    include %home%/%user%/conf/web/nginx.%domain%.conf*;
}



Thanks again for your time


Return to “Web Server”



Who is online

Users browsing this forum: No registered users and 8 guests

cron