vhost.conf.master does not generate any virtual host

Discussion in 'Installation/Configuration' started by ollea, Apr 17, 2012.

  1. ollea

    ollea New Member

    Hello,

    I am experiencing a problem with the /usr/local/ispconfig/server/conf/vhost.conf.master file.
    When I create or modify a website it generates the following Apache config file :

    <Directory /var/www/mydomain.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
    </Directory>

    It looks like it does not loop in the <tmpl_loop name="vhosts">.

    This was working before I updated to 3.0.4.4.

    If anybody can help me ? Thank you !
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    ls -la /usr/local/ispconfig/server/conf-custom/
     
  3. ollea

    ollea New Member

    Here it is :

    host:~# ls -laR /usr/local/ispconfig/server/conf-custom/
    /usr/local/ispconfig/server/conf-custom/:
    total 20
    drwxr-s--- 5 ispconfig ispconfig 4096 2012-04-10 23:30 .
    drwxr-s--- 13 ispconfig ispconfig 4096 2012-04-10 23:37 ..
    drwxr-s--- 2 ispconfig ispconfig 4096 2009-03-26 00:40 error
    drwxr-s--- 2 ispconfig ispconfig 4096 2012-04-10 23:37 index
    drwxr-s--- 2 ispconfig ispconfig 4096 2012-04-10 23:30 mail

    /usr/local/ispconfig/server/conf-custom/error:
    total 8
    drwxr-s--- 2 ispconfig ispconfig 4096 2009-03-26 00:40 .
    drwxr-s--- 5 ispconfig ispconfig 4096 2012-04-10 23:30 ..

    /usr/local/ispconfig/server/conf-custom/index:
    total 16
    drwxr-s--- 2 ispconfig ispconfig 4096 2012-04-10 23:37 .
    drwxr-s--- 5 ispconfig ispconfig 4096 2012-04-10 23:30 ..
    -rwxr-x--- 1 ispconfig ispconfig 1406 2009-11-26 15:11 favicon.ico
    -rwxr-x--- 1 ispconfig ispconfig 1937 2012-04-10 23:37 standard_index.html

    /usr/local/ispconfig/server/conf-custom/mail:
    total 8
    drwxr-s--- 2 ispconfig ispconfig 4096 2012-04-10 23:30 .
    drwxr-s--- 5 ispconfig ispconfig 4096 2012-04-10 23:30 ..

    I also tried to replace the /usr/local/ispconfig/server/conf/vhost.conf.master file by the package one but I get same result.
     
  4. ollea

    ollea New Member

    Any ideas would be more than welcome, thanks !
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

  6. ollea

    ollea New Member

    "Unfortunately" no problem, the script returns only this line : "finished."
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Then debugging is not enabled. Please check again that you enabled loglevel debug for this server under System > server config
     
  8. ollea

    ollea New Member

    Sorry, I hadn't enabled debugging, now it's more verbose :

    18.04.2012-12:01 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    18.04.2012-12:01 - DEBUG - Found 1 changes, starting update process.
    18.04.2012-12:01 - DEBUG - Unable to register function 'insert' from plugin 'mailman_plugin' for event 'mail_mailinglist_insert'
    18.04.2012-12:01 - DEBUG - Unable to register function 'update' from plugin 'mailman_plugin' for event 'mail_mailinglist_update'
    18.04.2012-12:01 - DEBUG - Unable to register function 'delete' from plugin 'mailman_plugin' for event 'mail_mailinglist_delete'
    18.04.2012-12:01 - DEBUG - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
    18.04.2012-12:01 - DEBUG - Calling function 'update' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
    18.04.2012-12:01 - DEBUG - exec: chmod 755 /var/www/clients/client91/web305/
    18.04.2012-12:01 - DEBUG - exec: chmod 755 /var/www/clients/client91/web305/\*
    chmod: cannot access `/var/www/clients/client91/web305/*': No such file or directory
    18.04.2012-12:01 - DEBUG - exec: chown root:root /var/www/clients/client91/web305/
    18.04.2012-12:01 - DEBUG - exec: chmod 777 /var/www/clients/client91/web305/tmp
    18.04.2012-12:01 - DEBUG - exec: chown web305:client91 /var/www/clients/client91/web305/log/error.log
    18.04.2012-12:01 - DEBUG - Disable SSL for:
    18.04.2012-12:01 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/mydomain.ch.vhost
    18.04.2012-12:01 - DEBUG - Apache status is: 1
    18.04.2012-12:01 - DEBUG - Calling function 'restartHttpd' from module 'web_module'.
    18.04.2012-12:01 - DEBUG - Apache online status after restart is: 1
    18.04.2012-12:01 - DEBUG - Processed datalog_id 7108
    18.04.2012-12:01 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock

    Apparently there are a few errors with mailman_plugin and chmod but nothing with vhost ?!
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Your system seems to be not updated correctly.Please redo the update by following the manual update instructions:

    http://www.howtoforge.com/forums/showthread.php?t=56854

    and choose to reconfigure services during update. You should also check the security level of the website, it should be set to high under system > server config > web
     
  10. ollea

    ollea New Member

    Thanks for the instructions. I did the update again like this :

    Code:
    host:~/downloads/ispconfig3_install/install# php -q update.php 
    
    
    --------------------------------------------------------------------------------
     _____ ___________   _____              __ _         ____
    |_   _/  ___| ___ \ /  __ \            / _(_)       /__  \
      | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _    _/ /
      | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |  |_ |
     _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| | ___\ \
     \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, | \____/
                                                  __/ |
                                                 |___/ 
    --------------------------------------------------------------------------------
    
    
    >> Update  
    
    Operating System: Debian Lenny or compatible
    
    This application will update ISPConfig 3 on your server.
    
    Shall the script create a ISPConfig backup in /var/backup/ now? (yes,no) [yes]: 
    
    PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /root/downloads/ispconfig3_install/install/update.php on line 131
    Creating backup of "/usr/local/ispconfig" directory...
    Creating backup of "/etc" directory...
    Checking ISPConfig database .. OK
    Starting incremental database update.
    Reconfigure Permissions in master database? (yes,no) [no]: 
    
    Reconfigure Services? (yes,no) [yes]: 
    
    Configuring Postfix
    Configuring Mailman
    Configuring Jailkit
    Configuring SASL
    Configuring PAM
    Configuring Courier
    Configuring Spamassassin
    Configuring Amavisd
    Configuring Getmail
    Configuring Pureftpd
    Configuring MyDNS
    Configuring Apache
    Configuring vlogger
    Configuring Apps vhost
    Configuring Database
    Updating ISPConfig
    ISPConfig Port [8888]: 
    
    Create new ISPConfig SSL certificate (yes,no) [no]: 
    
    Reconfigure Crontab? (yes,no) [yes]: 
    
    Updating Crontab
    Restarting services ...
    Stopping MySQL database server: mysqld.
    Starting MySQL database server: mysqld.
    Checking for corrupt, not cleanly closed and upgrade needing tables..
    Stopping Postfix Mail Transport Agent: postfix.
    Starting Postfix Mail Transport Agent: postfix.
    Stopping SASL Authentication Daemon: saslauthd.
    Starting SASL Authentication Daemon: saslauthd.
    Stopping amavisd: amavisd-new.
    Starting amavisd: amavisd-new.
    Stopping ClamAV daemon: clamd.
    Starting ClamAV daemon: clamd .
    Stopping Courier authentication services: authdaemond.
    Starting Courier authentication services: authdaemond.
    Stopping Courier IMAP server: imapd.
    Starting Courier IMAP server: imapd.
    Stopping Courier IMAP-SSL server: imapd-ssl.
    Starting Courier IMAP-SSL server: imapd-ssl.
    Stopping Courier POP3 server: pop3d.
    Starting Courier POP3 server: pop3d.
    Stopping Courier POP3-SSL server: pop3d-ssl.
    Starting Courier POP3-SSL server: pop3d-ssl.
    Restarting web server: apache2 ... waiting .
    Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -u 1000 -E -A -b -O clf:/var/log/pure-ftpd/transfer.log -H -D -B
    Update finished.
    
    I regenerated the vhost files but still the same result. Please find attached my new /usr/local/ispconfig/server/conf/vhost.conf.master file (after the update).

    Note that I'm running 32-bit Debian lenny.
     

    Attached Files:

  11. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /etc/apache2/sites-available/
    ?
     
  12. ollea

    ollea New Member

    Code:
    host:~# ls -la /etc/apache2/sites-available/
    total 380
    drwxr-xr-x 2 root root 4096 2012-04-19 02:01 .
    drwxr-xr-x 7 root root 4096 2012-02-16 14:50 ..
    -rw-r--r-- 1 root root 1091 2012-04-18 15:09 apps.vhost
    -rw-r--r-- 1 root root  950 2011-11-13 09:18 default
    -rw-r--r-- 1 root root 7469 2011-11-13 09:18 default-ssl
    -rw-r--r-- 1 root root 1350 2012-04-18 15:09 ispconfig.conf
    -rw-r--r-- 1 root root 1777 2012-04-18 15:09 ispconfig.vhost
    -rw-r--r-- 1 root root  106 2012-04-18 15:12 mynewdomain.ch.vhost
    -rw-r--r-- 1 root root 3369 2011-11-01 20:33 myolddomain.ch.vhost
    
     
  13. falko

    falko Super Moderator Howtoforge Staff

    mynewdomain.ch.vhost is the one that's making problems?

    Can you update the site in ISPConfig (enable or disable a feature like SSI for that website) adn then run

    Code:
    /usr/local/ispconfig/server/server.sh
    immediately afterwards? Do you see any errors in the output?
     
  14. ollea

    ollea New Member

    Yes the problem comes from mynewdomain.ch and also with every website I edit.

    No error excepted the 3 mailman_plugin, could my issue comes from these ?

    Code:
    19.04.2012-14:44 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    19.04.2012-14:44 - DEBUG - Found 1 changes, starting update process.
    19.04.2012-14:44 - DEBUG - Unable to register function 'insert' from plugin 'mailman_plugin' for event 'mail_mailinglist_insert'
    19.04.2012-14:44 - DEBUG - Unable to register function 'update' from plugin 'mailman_plugin' for event 'mail_mailinglist_update'
    19.04.2012-14:44 - DEBUG - Unable to register function 'delete' from plugin 'mailman_plugin' for event 'mail_mailinglist_delete'
    19.04.2012-14:44 - DEBUG - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
    19.04.2012-14:44 - DEBUG - Calling function 'update' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
    19.04.2012-14:44 - DEBUG - exec: chmod 751 /var/www/clients/client91/web305/
    19.04.2012-14:44 - DEBUG - exec: chmod 751 /var/www/clients/client91/web305/*
    19.04.2012-14:44 - DEBUG - exec: chmod 710 /var/www/clients/client91/web305/web
    19.04.2012-14:44 - DEBUG - exec: chmod 777 /var/www/clients/client91/web305/tmp
    19.04.2012-14:44 - DEBUG - exec: usermod --groups sshusers web305
    19.04.2012-14:44 - DEBUG - exec: chown web305:client91 /var/www/clients/client91/web305
    19.04.2012-14:44 - DEBUG - exec: chown web305:client91 /var/www/clients/client91/web305/log/error.log
    19.04.2012-14:44 - DEBUG - Disable SSL for: 
    19.04.2012-14:44 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/mynewdomain.ch.vhost
    19.04.2012-14:44 - DEBUG - Apache status is: 1
    19.04.2012-14:44 - DEBUG - Calling function 'restartHttpd' from module 'web_module'.
    19.04.2012-14:44 - DEBUG - Apache online status after restart is: 1
    19.04.2012-14:44 - DEBUG - Processed datalog_id 7113
    19.04.2012-14:44 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished.
     
  15. falko

    falko Super Moderator Howtoforge Staff

    Did you modify vhost.conf.master (or any other ISPconfig file)? Do you maybe use an old template with a new ISPConfig version?
     
  16. ollea

    ollea New Member

    Yes I've modified vhost.conf.master but I also tried replacing it by the package one but I still get the same problem.

    Could you please tell me which other templates files affect the generation of vhosts ?

    Thanks,
     
  17. falko

    falko Super Moderator Howtoforge Staff

    When you use the vhost.conf template that comes with ISPConfig, did you remove your customized version from /usr/local/ispconfig/server/conf-custom/?
     
  18. ollea

    ollea New Member

    Yes I removed /usr/local/ispconfig/server/conf-custom/vhost.conf.master and restored /usr/local/ispconfig/server/conf/vhost.conf.master from the original package file but still same result.

    After removing the line beginning with "<tmpl_loop name="vhosts">" from /usr/local/ispconfig/server/conf/vhost.conf.master it works.

    The loop "<tmpl_loop name="redirects">" doesn't generate anything.

    So I think there is a problem with the script that handles the generation of the loops. Don't you think ?
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    I dont think hat thre is a problem with the script from ispconfig as it works on several thousands of servers that updated already to this version. I guess there must be still some modifications in your installation like a customized plugin or a similar problem that cause this.

    That it eorks after sou removed the vhosts loop indicates that sour server uses a ispconfig apache plugin from a older release and not the current release. Ensure that you dont use a customized apache plugin without adopting it to the new ispconfig release. If you are sure hat you dont use any customized code, then check that the apache plugin in the plugins-availabe directory of ispconfig is really the one from the latest tar.gz and that the symlink in the plugins-enabled directory really ponts to this new plugin file.
     
  20. ollea

    ollea New Member

    OK, I've downgraded all the php5 and apache2 packages to lenny but I'm still getting the problem.

    I'm gonna migrate to Debian squeeze and change the server so hopefully it will work. Thank you for your help.

    Could you please tell me if there is a way to force the regeneration of all vhost and other config files with ISPConfig ?
     

Share This Page