Apache did not start after modifying this vhost file.

Discussion in 'Installation/Configuration' started by Gustavs, Jul 28, 2015.

  1. Gustavs

    Gustavs New Member

    Hello.
    I followed this tutorial to install ISPConfig 3 on Debian 7.
    https://www.howtoforge.com/tutorial/ispconfig-install-script-debian/

    When I added website, two files were generated in /etc/apache2/sites-available
    <domain>.vhost and <domain>.vhost.err

    vhost file contains this:
    Code:
    # Apache did not start after modifying this vhost file.
    # Please check file /etc/apache2/sites-available/bluedroid.lv.vhost.err for syntax errors.
    .vhost.err
    Code:
    <Directory /var/www/bluedroid.lv>
                    AllowOverride None
                                    Order Deny,Allow
                    Deny from all
                    </Directory>
    
    <VirtualHost *:80>
                                            DocumentRoot /var/www/bluedroid.lv/web
    
                    ServerName bluedroid.lv
                    ServerAlias www.bluedroid.lv
                    ServerAdmin [email protected]
    
                    ErrorLog /var/log/ispconfig/httpd/bluedroid.lv/error.log
    
                    Alias /error/ "/var/www/bluedroid.lv/web/error/"
                    ErrorDocument 400 /error/400.html
                    ErrorDocument 401 /error/401.html
                    ErrorDocument 403 /error/403.html
                    ErrorDocument 404 /error/404.html
                    ErrorDocument 405 /error/405.html
                    ErrorDocument 500 /error/500.html
                    ErrorDocument 502 /error/502.html
                    ErrorDocument 503 /error/503.html
    
                    <IfModule mod_ssl.c>
                    </IfModule>
    
                    <Directory /var/www/bluedroid.lv/web>
                                    # Clear PHP settings of this website
                                    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
                                                    SetHandler None
                                    </FilesMatch>
                                    Options +FollowSymLinks
                                    AllowOverride All
                                                                    Order allow,deny
                                    Allow from all
                                                    </Directory>
                    <Directory /var/www/clients/client1/web1/web>
                                    # Clear PHP settings of this website
                                    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
                                                    SetHandler None
                                    </FilesMatch>
                                    Options +FollowSymLinks
                                    AllowOverride All
                                                                    Order allow,deny
                                    Allow from all
                                                    </Directory>
    
    
    
    
                    # suexec enabled
                    <IfModule mod_suexec.c>
                            SuexecUserGroup web1 client1
                    </IfModule>
                    # php as fast-cgi enabled
            # For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
                    <IfModule mod_fcgid.c>
                                    IdleTimeout 300
                                    ProcessLifeTime 3600
                                    # MaxProcessCount 1000
                                    DefaultMinClassProcessCount 0
                                    DefaultMaxClassProcessCount 100
                                    IPCConnectTimeout 3
                                    IPCCommTimeout 600
                                    BusyTimeout 3600
                    </IfModule>
                    <Directory /var/www/bluedroid.lv/web>
                                    <FilesMatch "\.php[345]?$">
                                            SetHandler fcgid-script
                                    </FilesMatch>
                                    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
                                    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php3
                                    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php4
                                    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php5
                                    Options +ExecCGI
                                    AllowOverride All
                                                                    Order allow,deny
                                    Allow from all
                                                    </Directory>
                    <Directory /var/www/clients/client1/web1/web>
                                    <FilesMatch "\.php[345]?$">
                                            SetHandler fcgid-script
                                    </FilesMatch>
                                    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
                                    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php3
                                    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php4
                                    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php5
                                    Options +ExecCGI
                                    AllowOverride All
                                                                    Order allow,deny
                                    Allow from all
                                                    </Directory>
    
    
                    # add support for apache mpm_itk
                    <IfModule mpm_itk_module>
                            AssignUserId web1 client1
                    </IfModule>
    
                    <IfModule mod_dav_fs.c>
                    # Do not execute PHP files in webdav directory
                            <Directory /var/www/clients/client1/web1/webdav>
                                    <ifModule mod_security2.c>
                                            SecRuleRemoveById 960015
                                            SecRuleRemoveById 960032
                                    </ifModule>
                                    <FilesMatch "\.ph(p3?|tml)$">
                                            SetHandler None
                                    </FilesMatch>
                            </Directory>
                            DavLockDB /var/www/clients/client1/web1/tmp/DavLock
                            # DO NOT REMOVE THE COMMENTS!
                            # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
          # WEBDAV BEGIN
                            # WEBDAV END
                    </IfModule>
    
    
    </VirtualHost>
    
    And website is not wirkng. It shows apache default It works page, but it must show ISPConfig default page.

    Please help, I'll give you needed logs or anything needed.

    Thank you.
     
  2. Gustavs

    Gustavs New Member

    Can anyone help me? What's wrong there?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    run:

    Code:
    mv /etc/apache2/sites-available/bluedroid.lv.vhost /etc/apache2/sites-available/bluedroid.lv.vhost.bak
    mv /etc/apache2/sites-available/bluedroid.lv.vhost.err /etc/apache2/sites-available/bluedroid.lv.vhost
    then restart apache and check the apache error.log for the reason of the error.
     
  4. mislav

    mislav Member

    Always always before you edit some apache configuration/vhost run command
    # apachectl configtest (if you see Syntax OK - feel free to restart apache)

    This will give you warning if something is wrong so you can correct that before restarting apache. You will at least avoid temporary website downtime.
     
  5. Gustavs

    Gustavs New Member

    Thank you for reply. This is output of error.log - https://gist.github.com/anonymous/b983b36b4047170453ee
    Thank you, output of this command said OK
    Code:
    root@gustavs:/var/log/apache2# apachectl configtest
    [Thu Jul 30 13:01:14 2015] [warn] NameVirtualHost *:443 has no VirtualHosts
    Syntax OK
    
     
  6. Gustavs

    Gustavs New Member

    anyone?
     
  7. Gustavs

    Gustavs New Member

  8. till

    till Super Moderator Staff Member ISPConfig Developer

  9. Gustavs

    Gustavs New Member

    This is output
    Code:
    root@gustavs:~# /usr/local/ispconfig/server/server.sh
    /usr/bin/fail2ban-client
    /sbin/iptables
    /sbin/ip6tables
    finished.
    root@gustavs:~#
    
    I did not disable any functions. I used autoinstaller
     
  10. Gustavs

    Gustavs New Member

    Thank you, I find that exec was disabled. Now it is enabled and my website works.
    Now I can't load php files, it shows me 500 error.

    No, it is not working anyway. /usr/local/ispconfig/server/server.sh returns "finished"
    error log:
    https://gist.github.com/GRacenajs/eb8cc4b2324e8ac5d184
     
    Last edited: Jul 31, 2015
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you haven't enabled the debug log level.
     

Share This Page