vhost_ispconfig not beeing updated

Discussion in 'Installation/Configuration' started by dezibel, Jun 22, 2007.

  1. dezibel

    dezibel New Member

    Hi there!

    just updatet to the latest ISP-config, and now my vhost_ispconfig-file won't reflect any changes made to sites in ispconfig. here is the output from the ispconfig logfile:
    Code:
    22.06.2007 - 10:17:57 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1231: cp -fr /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf~
    22.06.2007 - 10:17:57 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2418: WARNING: could not httpd -t  &> /dev/null
    22.06.2007 - 10:17:57 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2429: httpd syntax seems to contain errors, reloading with old configuration
    22.06.2007 - 10:17:57 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2430: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf_22-06-07_10-17-57
    22.06.2007 - 10:17:57 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2431: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf~ /etc/apache2/vhosts/Vhosts_ispconfig.conf
    22.06.2007 - 10:17:58 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/apache2 reload &> /dev/null
    22.06.2007 - 10:17:58 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1892: cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~
    
    and here is httpd -t:
    Code:
    admin@ubuntu-p3:~$ httpd -t
    Syntax OK
    
    Why?

    please help :)
     
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    You must rename the Vhost_ispconfig.conf file with the date appended to Vhost_ispconfig.conf before you run httpd -t.

    Code:
    mv /etc/apache2/vhosts/Vhosts_ispconfig.conf_22-06-07_10-17-57 /etc/apache2/vhosts/Vhosts_ispconfig.conf
     
  3. dezibel

    dezibel New Member

    thanks :) that told me why is failed :)
     
  4. actiononline

    actiononline New Member

    Different situation, same problem

    I had to recover my ISP Config server after it recently lost some data due to the hdd heating up. At the same time I also upgraded from ISPC version 2.2.6 to 2.2.19. I managed to get the ISP Config running fine on the new installation, but now it cannot write to the Vhosts_ispconfig.conf

    I also do not have a copy of the dated *.conf file anywhere, only the actual Vhosts_ispconfig.conf, and ISP Config cannot write to this file, as I have to manually add new websites and delete them from this file. The output of httpd -t as follows:
    PHP:
    httpdCould not reliably determine the server's fully qualified domain name, using mail.actiononline.co.za for ServerName
    [Thu Mar 20 06:54:11 2008] [warn] NameVirtualHost 196.37.170.xxx:80 has no VirtualHosts
    [Thu Mar 20 06:54:11 2008] [warn] NameVirtualHost 196.37.170.xxx:80 has no VirtualHosts
    Syntax OK
    Although it says it has no VirtualHosts, all the websites are accessible on the server. Adding, editing or deleting either mailbox users or domains from the ISPConfig control panel has no effect on the actual files.
     
  5. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    The messages are warnings and not errors, you can ignore them.

    If you want to find a error in Vhost_ispconfig.conf, rename the files as I described above before you run httpd -t
     
  6. actiononline

    actiononline New Member

    I renamed my Vhost_ispconfig.conf file to Vhost_ispconfig.conf_01-03-08_10-17-57 and saved in in etc/apache2/vhosts/ and restarted everything. I then added a new website in the control panel, and although it shows up there, it was not added to the Vhost_ispconfig.conf file.

    On an existing website I had a login problem with one of the mail accounts on the domain. I tried resetting the password, and that didn't work, so I deleted the user and wanted to re-create the box. This then gave me an error from the ISPC control panel saying the account already exists. I checked the passwd file, and there is no such user. I then also checked the virtualusertable in postfix to see if the user is there, but nothing.

    So where else can the user information be that prevents ISPConfig from deleting the info and recreating? And then how can the permission problem be sorted out that will allow ISPConfig to write to all the necessary files?
     
  7. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Did you rename the Vhost_ispconfig.conf file with the date appended to Vhost_ispconfig.conf and run
    Code:
    httpd -t
    ?
     
  8. actiononline

    actiononline New Member

    yes, I renamed the file and ran httpd -t and it gave me the same output as before
     
  9. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's the output of
    Code:
    ls -la /etc/apache2/vhosts
    and
    Code:
    ls -la /root/ispconfig
    ? Any errors/warnings in /home/admispconfig/ispconfig/ispconfig.log?
     
  10. actiononline

    actiononline New Member

    PHP:
    mail:~ # ls -la /etc/apache2/vhosts
    total 248
    drwxr
    -xr-x  2 root root   4096 Mar 20 11:42 .
    drwxr-xr-x 11 root root   4096 Mar 14 19:51 ..
    -
    rw-rw----  1 root root 118096 Mar 18 18:42 Vhosts_ispconfig.conf
    -rw-r-----  1 root root 118096 Mar 20 11:42 Vhosts_ispconfig.conf_01-03-08_10-17-57

    mail
    :~ # ls -la /root/ispconfig
    total 100
    drwxr
    -xr-x  9 root root  4096 Mar 22 15:20 .
    drwx------ 13 root root  4096 Mar 21 10:29 ..
    -
    rw-r--r--  1 root root     8 Mar 22 15:20 .old_path_httpd_root
    -rwxr-xr-x  1 root root 34515 Mar 14 19:51 cronolog
    -rwxr-xr-x  1 root root  9673 Mar 14 19:51 cronosplit
    drwxr
    -xr-x 12 root root  4096 Mar 14 19:35 httpd
    drwxr
    -xr-x 15 root root  4096 Mar 14 19:51 isp
    drwxr
    -xr-x  6 root root  4096 Mar 14 19:30 openssl
    drwxr
    -xr-x  6 root root  4096 Mar 20 15:38 php
    drwxr
    -xr-x  4 root root  4096 Mar 18 23:59 scripts
    drwxr
    -xr-x  4 root root  4096 Mar 14 19:51 standard_cgis
    drwxr
    -xr-x  2 root root  4096 Mar 14 19:51 sv
    -rwx------  1 root root  9389 Mar 14 19:51 uninstall
    And here is what I could see in the ISPConfig log when the user mailbox was deleted and recreated.

    PHP:
    18.03.2008 13:21:25 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2597rm -fr /var/www/web119/user/brokor.co.za_stuart
    18.03.2008 
    13:23:34 => DEBUG The username is already in use.<br><br><br> <a href='../../isp_manager/frame_start.php?'>Next &gt;&gt;</a>
    18.03.2008 13:24:50 => DEBUG The username is already in use.<br><br><br> <a href='../../isp_manager/frame_start.php?'>Next &gt;&gt;</a>
    18.03.2008 13:48:17 => INFO Signalfile Setinsert
    18.03.2008 
    13:48:26 => WARN WARNINGcould not open file
    Then I also saw this that seemed suspect:

    PHP:
    21.03.2008 09:48:24 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2520httpd syntax ok
    21.03.2008 
    09:48:24 => WARN - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728WARNINGcould not /etc/rc.d/init.d/httpd reload &> /dev/null
    21.03.2008 
    09:48:24 => WARN - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728WARNINGcould not /etc/rc.d/init.d/postfix stop &> /dev/null
    21.03.2008 
    09:48:24 => WARN - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728WARNINGcould not /etc/rc.d/init.d/postfix start &> /dev/null
     
  11. actiononline

    actiononline New Member

    deleting a domain

    When I delete a domain from the ISPC Control Panel, I get the following in the logs:

    PHP:
    22.03.2008 19:26:57 => INFO Signalfile Setinsert
    22.03.2008 
    19:26:57 => INFO Signalfile Setdelete: do
    22.03.2008 19:26:57 => INFO Signalfile Setdelete: do
    22.03.2008 19:26:57 => INFO Signalfile Setdelete: do
    22.03.2008 19:27:03 => WARN WARNINGcould not open file
    22.03.2008 
    19:27:04 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 514Connected successfully
    22.03.2008 
    19:27:05 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 575MySQL FLUSH PRIVILEGES
    22.03.2008 
    19:27:08 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 995setquota -u brisondistribution.co.za_webmas 0 0 0 0 -&> /dev/null
    22.03.2008 
    19:27:08 => INFO USER:
    brisondistribution.co.za_webmas:x:10460:10177:webmaster:/var/www/web177:/dev/null
    22.03.2008 
    19:27:08 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 137cp -fr /etc/postfix/local-host-names /etc/postfix/local-host-names~
    22.03.2008 19:27:09 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 284cp -fr /etc/postfix/virtusertable /etc/postfix/virtusertable~
    22.03.2008 19:27:09 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 289postmap hash:/etc/postfix/virtusertable
    22.03.2008 
    19:27:09 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 1259cp -fr /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf~
    22.03.2008 19:27:10 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2513httpd -t  &> /dev/null
    22.03.2008 
    19:27:10 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2520httpd syntax ok
    22.03.2008 
    19:27:10 => WARN - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728WARNINGcould not /etc/rc.d/init.d/httpd reload &> /dev/null
    22.03.2008 
    19:27:10 => WARN - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728WARNINGcould not /etc/rc.d/init.d/postfix stop &> /dev/null
    22.03.2008 
    19:27:10 => WARN - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728WARNINGcould not /etc/rc.d/init.d/postfix start &> /dev/null
    22.03.2008 
    19:27:10 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 1984cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~
    And when I then look in the Vhosts_ispconfig.conf file, the entry for the domain is still there, and when restarting apache, it won't restart because the directories for the domain has been deleted, but the Vhosts_ispconfig.conf still calls the domain. When I manually delete the domain from the file and then start apache, it starts fine without issues.
     
    Last edited: Mar 22, 2008
  12. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please delete that domain from the recycle bin also.
     
  13. actiononline

    actiononline New Member

    Ok I found a few interesting things. I am working with Suse10.3, and the httpd.conf file had an entry
    Include /etc/apache2/vhosts.d/*.conf and then right at the bottom of the file it had almost the same thing again but looking like this:
    Include /etc/apache2/vhosts/Vhosts_ispconfig.conf

    I removed the first Include calling for the file in /vhosts.d, and the proceeded to delete a few of the dormant domains. Even after emptying the recycle bin in ISPConfig, I had absolutely no error anywhere. But when I manually restarted the apache server in SSH, this is what I got, preventing apache from starting.

    PHP:
    mail:/etc/apache2/vhosts # /etc/init.d/apache2 restart
    WarningDocumentRoot [/var/www/web13/webdoes not exist
    Warning
    DocumentRoot [/var/www/web72/webdoes not exist
    Warning
    DocumentRoot [/var/www/web177/webdoes not exist
    Warning
    DocumentRoot [/var/www/web13/webdoes not exist
    Warning
    DocumentRoot [/var/www/web72/webdoes not exist
    Warning
    DocumentRoot [/var/www/web13/webdoes not exist
    Warning
    DocumentRoot [/var/www/web72/webdoes not exist
    httpd2
    -preforkCould not reliably determine the server's fully qualified domain name, using 196.37.170.xx for ServerName
    [Sun Mar 23 20:03:48 2008] [warn] NameVirtualHost 196.37.170.xx:80 has no VirtualHosts
    [Sun Mar 23 20:03:48 2008] [warn] NameVirtualHost 196.37.170.xx:80 has no VirtualHosts
    Syntax OK
    Shutting down httpd2 (waiting for all children to terminate)          done
    Starting httpd2 (prefork) Warning: DocumentRoot [/var/www/web13/web] does not exist
    Warning: DocumentRoot [/var/www/web72/web] does not exist
    Warning: DocumentRoot [/var/www/web177/web] does not exist
    Warning: DocumentRoot [/var/www/web13/web] does not exist
    Warning: DocumentRoot [/var/www/web72/web] does not exist
    httpd2-prefork: Could not reliably determine the server'
    s fully qualified domain nameusing 196.37.170.xx for ServerName
    [Sun Mar 23 20:03:49 2008] [warnNameVirtualHost 196.37.170.xx:80 has no VirtualHosts
    [Sun Mar 23 20:03:49 2008] [warnNameVirtualHost 196.37.170.xx:80 has no VirtualHosts
    startproc
    :  exit status of parent of /usr/sbin/httpd2-prefork1
    To fix this I had to delete the entries for these domains again from the VHosts_ispconfig.conf file and restart, this time without errors.

    So it would seem that ISPConfig does not have permission to write to the vhost file when you add and delete domains.
     
  14. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's the output of
    Code:
    ls -la /etc/apache2/vhosts
    ?
     
  15. actiononline

    actiononline New Member

    mail:~ # ls -la /etc/apache2/vhosts
    total 244
    drwxr-xr-x 2 root root 4096 Mar 23 20:05 .
    drwxr-xr-x 11 root root 4096 Mar 23 20:25 ..
    -rw-rw---- 1 root root 111557 Mar 23 20:12 Vhosts_ispconfig.conf
    -rw-r----- 1 root root 118096 Mar 20 11:42 Vhosts_ispconfig.conf_01-03-08_10-17-57
     
  16. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

Share This Page