Help! Websites not being created in Vhosts file

Discussion in 'Installation/Configuration' started by punto, Aug 4, 2007.

  1. punto

    punto New Member

    Hi,

    When I create a website through the control panel, it creates fine and shows up in the control panel, but when I try and access it, I just receive the shared IP page.

    Further investigation showed that nothing is being created in the Vhosts_ispconfig.conf file for new websites.

    I already have 20 websites setup and working fine, it is a production server, CENTOS 5 and ISPconfig version 2.2.15.

    I have checked DNS and all settings are ok.

    Please help!

    Regards
    Matt
     
  2. punto

    punto New Member

    Here is the log file when I create a new website and it doesnt show up in the Vhosts file. There are some warn errors, one in particular which relates to the httpd syntax??

    PHP:
    04.08.2007 14:21:19 => INFO Signalfile Setinsert
    04.08.2007 
    14:21:19 => INFO Signalfile Setdelete: do
    04.08.2007 14:21:25 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 514Connected successfully
    04.08.2007 
    14:21:25 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 575MySQL FLUSH PRIVILEGES
    04.08.2007 
    14:21:25 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 137cp -fr /etc/postfix/local-host-names /etc/postfix/local-host-names~
    04.08.2007 14:21:25 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 284cp -fr /etc/postfix/virtusertable /etc/postfix/virtusertable~
    04.08.2007 14:21:26 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 289postmap hash:/etc/postfix/virtusertable
    04.08.2007 
    14:21:26 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 1231cp -fr /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf~
    04.08.2007 14:21:26 => WARN - /root/ispconfig/scripts/lib/config.lib.phpLine 2419WARNINGcould not httpd -t  &> /dev/null
    04.08.2007 
    14:21:26 => WARN - /root/ispconfig/scripts/lib/config.lib.phpLine 2430httpd syntax seems to contain errorsreloading with old configuration
    04.08.2007 
    14:21:26 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2431mv -/etc/httpd/conf/vhosts/Vhosts_ispconfig.conf /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf_04-08-07_14-21-26
    04.08.2007 
    14:21:26 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2432mv -/etc/httpd/conf/vhosts/Vhosts_ispconfig.conf~ /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf
    04.08.2007 
    14:21:26 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728: /etc/rc.d/init.d/httpd reload &> /dev/null
    04.08.2007 
    14:21:26 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728: /etc/rc.d/init.d/postfix stop &> /dev/null
    04.08.2007 
    14:21:27 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728: /etc/rc.d/init.d/postfix start &> /dev/null
    04.08.2007 
    14:21:27 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 1893cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~
    04.08.2007 14:21:31 => INFO Signalfile Set: empty trash
    04.08.2007 
    14:21:37 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 137cp -fr /etc/postfix/local-host-names /etc/postfix/local-host-names~
    04.08.2007 14:21:37 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 284cp -fr /etc/postfix/virtusertable /etc/postfix/virtusertable~
    04.08.2007 14:21:37 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 289postmap hash:/etc/postfix/virtusertable
    04.08.2007 
    14:21:37 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 1231cp -fr /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf~
    04.08.2007 14:21:38 => WARN - /root/ispconfig/scripts/lib/config.lib.phpLine 2419WARNINGcould not httpd -t  &> /dev/null
    04.08.2007 
    14:21:38 => WARN - /root/ispconfig/scripts/lib/config.lib.phpLine 2430httpd syntax seems to contain errorsreloading with old configuration
    04.08.2007 
    14:21:38 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2431mv -/etc/httpd/conf/vhosts/Vhosts_ispconfig.conf /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf_04-08-07_14-21-38
    04.08.2007 
    14:21:38 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2432mv -/etc/httpd/conf/vhosts/Vhosts_ispconfig.conf~ /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf
    04.08.2007 
    14:21:38 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728: /etc/rc.d/init.d/httpd reload &> /dev/null
    04.08.2007 
    14:21:38 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728: /etc/rc.d/init.d/postfix stop &> /dev/null
    04.08.2007 
    14:21:39 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728: /etc/rc.d/init.d/postfix start &> /dev/null
    04.08.2007 
    14:21:39 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 1893cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~
    04.08.2007 14:21:39 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2478rm -fr /var/www/www.fascinateme.info
    04.08.2007 
    14:21:39 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2479rm -fr /var/www/web37
    04.08.2007 
    14:21:39 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2484setquota -g web37 0 0 0 0 -&> /dev/null
    04.08.2007 
    14:22:05 => INFO Signalfile Setinsert
    04.08.2007 
    14:22:09 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 1059cp -fr /root/ispconfig/isp/error_en /var/www/web38/web/error
    04.08.2007 
    14:22:09 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 1067cp -fr /root/ispconfig/isp/standard_index.html_en /var/www/web38/web/index.html
    04.08.2007 
    14:22:09 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 1099ln -/var/www/web38 /var/www/www.fascinateme.info
    04.08.2007 
    14:22:09 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 94setquota -g web38 204800 205824 0 0 -&> /dev/null
    04.08.2007 
    14:22:09 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 95setquota --g web38 604800 604800 -&> /dev/null
    04.08.2007 
    14:22:09 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 116Connected successfully
    04.08.2007 
    14:22:09 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 214MySQL FLUSH PRIVILEGES
    04.08.2007 
    14:22:09 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 137cp -fr /etc/postfix/local-host-names /etc/postfix/local-host-names~
    04.08.2007 14:22:09 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 284cp -fr /etc/postfix/virtusertable /etc/postfix/virtusertable~
    04.08.2007 14:22:10 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.phpLine 289postmap hash:/etc/postfix/virtusertable
    04.08.2007 
    14:22:10 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 1231cp -fr /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf~
    04.08.2007 14:22:10 => WARN - /root/ispconfig/scripts/lib/config.lib.phpLine 2419WARNINGcould not httpd -t  &> /dev/null
    04.08.2007 
    14:22:10 => WARN - /root/ispconfig/scripts/lib/config.lib.php, [B]Line 2430httpd syntax seems to contain errorsreloading with old configuration[/B]
    04.08.2007 14:22:10 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2431mv -/etc/httpd/conf/vhosts/Vhosts_ispconfig.conf /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf_04-08-07_14-22-10
    04.08.2007 
    14:22:10 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 2432mv -/etc/httpd/conf/vhosts/Vhosts_ispconfig.conf~ /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf
    04.08.2007 
    14:22:10 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728: /etc/rc.d/init.d/httpd reload &> /dev/null
    04.08.2007 
    14:22:10 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728: /etc/rc.d/init.d/postfix stop &> /dev/null
    04.08.2007 
    14:22:11 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.phpLine 728: /etc/rc.d/init.d/postfix start &> /dev/null
    04.08.2007 
    14:22:11 => INFO - /root/ispconfig/scripts/lib/config.lib.phpLine 1893cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~
     
  3. punto

    punto New Member

    I actually dont think I have added a website since IP upgraded from 2.2.14 to 2.2.15, maybe the upgrade is causing the issues?
    Also I have many 'backups' of my Virtual Hosts file, seems to add a new one whenever I add a site.

    PHP:
    Vhosts_ispconfig.conf                    Vhosts_ispconfig.conf_04-08-07_14-07-52  Vhosts_ispconfig.conf_04-08-07_14-39-04
    Vhosts_ispconfig
    .conf_04-08-07_08-21-31  Vhosts_ispconfig.conf_04-08-07_14-10-33  Vhosts_ispconfig.conf_04-08-07_14-39-36
    Vhosts_ispconfig
    .conf_04-08-07_13-47-23  Vhosts_ispconfig.conf_04-08-07_14-21-26  Vhosts_ispconfig.conf_13-07-07_11-41-33
    Vhosts_ispconfig
    .conf_04-08-07_14-04-05  Vhosts_ispconfig.conf_04-08-07_14-21-38  Vhosts_ispconfig.conf_13-07-07_12-45-40
    Vhosts_ispconfig
    .conf_04-08-07_14-04-27  Vhosts_ispconfig.conf_04-08-07_14-22-10  Vhosts_ispconfig.conf_21-07-07_20-42-07
    Vhosts_ispconfig
    .conf_04-08-07_14-05-10  Vhosts_ispconfig.conf_04-08-07_14-37-12
    These two line from ispconfig.log seemed interesting

    04.08.2007 - 14:39:36 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2419: WARNING: could not httpd -t &> /dev/null
    04.08.2007 - 14:39:36 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2430: httpd syntax seems to contain errors, reloading with old configuration


    If I run httpd -t from the command line it returns Syntax OK ??
     
    Last edited: Aug 4, 2007
  4. juampi

    juampi New Member

    Wll,
    I Have the self problem.
    My Vhosts_ispconfig.conf backup files save all new change maked, but Vhosts_ispconfig.conf have old information.
    My Log:
    Code:
    04.08.2007 - 18:25:21 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1231: cp -fr /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf~
    04.08.2007 - 18:25:22 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2419: WARNING: could not httpd -t  &> /dev/null
    04.08.2007 - 18:25:22 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2430: httpd syntax seems to contain errors, reloading with old configuration
    04.08.2007 - 18:25:22 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2431: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf_04-08-07_18-25-22
    04.08.2007 - 18:25:22 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2432: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf~ /etc/apache2/vhosts/Vhosts_ispconfig.conf
    04.08.2007 - 18:25:22 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/apache2 reload &> /dev/null
    
    See the WARN
    Code:
    04.08.2007 - 18:25:22 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2430: httpd syntax seems to contain errors, reloading with old configuration
    See my httpd -t

    Code:
    [Sat Aug 04 18:38:10 2007] [warn] NameVirtualHost 200.61.183.149:80 has no VirtualHosts
    [Sat Aug 04 18:38:10 2007] [warn] NameVirtualHost 200.61.xxx.xxx:80 has no VirtualHosts
    [Sat Aug 04 18:38:10 2007] [warn] NameVirtualHost 200.45.xxx.xxx:80 has no VirtualHosts
    [Sat Aug 04 18:38:10 2007] [warn] NameVirtualHost 200.45.xxx.xxx:80 has no VirtualHosts
    Syntax OK
    
    See xxx.xxx is add for this post.
    Is only 2 WARN, but the Syntax is OK.

    I will try change the script reload.

    Regards,
    JP
     
  5. juampi

    juampi New Member

    I changed two functions in /root/ispconfig/scripts/lib/config.lib.php
    1- function apache_restart()
    2- function apache_reload()

    The verification of WARN has been modified and now everything works fine. But this solution is not the correct one. I will continue seeing as it is the best solution.

    Regards
    JP
     
  6. juampi

    juampi New Member

    I think that is important to make a verification of the Apache Directives form ISPConfig Control Panel.
    With this option we can avoid problems of bad directives.
    Is only a suggestion.

    Regards,
    JP
     
  7. punto

    punto New Member

    thanks for the work around JP, but yes it isn't ideal :confused:

    Hopefully there is a better solution.

    Regards

    Matt
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The warnings are "[Sat Aug 04 18:38:10 2007] [warn] NameVirtualHost 200.45.xxx.xxx:80 has no VirtualHosts" are not causing the error message "04.08.2007 - 18:25:22 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2430: httpd syntax seems to contain errors, reloading with old configuration" in the ISPConfig log. Please rename one of the Vhost_ispconfig.conf files, e.g. /etc/apache2/vhosts/Vhosts_ispconfig.conf_04-08-07_18-25-22 to /etc/apache2/vhosts/Vhosts_ispconfig.conf and run "httpd -t" and post the output that you get then. Make sure that you make abackup of the file /etc/apache2/vhosts/Vhosts_ispconfig.conf before you overwrite it.
     
  9. punto

    punto New Member

    Thanks Till, you nailed it.

    When I did as you suggested, I received this error
    "Syntax error on line 951 of /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf:
    AuthName takes one argument, The authentication realm (e.g. "Members Only")"


    Was the apache directives (or lack of) causing the issue, just me trying to get a little fancy :eek:

    All good now.

    Regards

    Matt
     

Share This Page