Hi all; I am experiencing a problem similar to the one Hans described in his first post here: http://howtoforge.org/forums/showthread.php?t=7409 - so, any new subdomain I create seems not to cause Apache to deliver the "real" content for that new site, but the default "this is a shared ip server" page. What would be the right place to check to find out where things are going wrong here? So far, I had a look at my server's /etc/apache2/vhosts/Vhosts_ispconfig.conf and noticed that while there are entries for all my other (sub)domains, no new vhosts were added for the newly created ones. I'd appreciate any help you can give. Thanks, kuckus
There must be a error in your apache configuration. 1) Make a backup of /etc/apache2/vhosts/Vhosts_ispconfig.conf 2) Rename the latest file /etc/apache2/vhosts/Vhosts_ispconfig.conf_.... that has a date appended to /etc/apache2/vhosts/Vhosts_ispconfig.conf 3) run httpd -t to get the error message.
I'm having the same problem, running debian 3.1 64 bit with ispconfig 2.2.7 The changes is not saved anymore in Vhosts_ispconfig.conf and if I clean the file of it's content, and run /root/ispconfig/php/php /root/ispconfig/scripts/writeconf.php nothing is saved either. No error message appears, but only: start ende and httpd -t gives Syntax OK Help very much apriciated
Please doe xactly what I posted above. httpd -t gives you always OK if you dont copy the Vhost_ispconfig file with a date appended over the Vhost_ispconfig.conf file.
Similar problem I've had a similar problem. When i added a website the Vhosts file wasn't updated. Somehow on one of my domains there was an extra space 'www.domain.ltd ' I've tried removing it using the form but without success, i searched in the database and removed the space manually. Now when i create a new site it writes the new file as expected. @Till & Falko -> You should use trim() in your script before inserting / updating the form fields! Just a tip! Kind regards Martin
ok, I did those steps and get this error: I removed that line, as that was done during an earlier testing phase and everything runs smoothly now. thx for the debug help
Hello, i had a similar issue. On my system the line in bold caused the issue: Code: ... <Files *.php5> SetOutputFilter PHP SetInputFilter PHP </Files> [b]php_admin_flag safe_mode Off[/b] Alias /error/ "/var/www/web5/web/error/" ErrorDocument 400 /error/invalidSyntax.html ... I just wonder why this happend. It was the first Domain. Seems it happens after installing version 2.2.12. After i removed that line httpd -t returns "Config OK", but still no new vhosts are added to the file. (I deleted an existing web, removed it from trashcan and recreated it - still no new entry. However teh timestap of the vhost config file changed, so "something" happend.)
What's the output of Code: ls -la /root/ispconfig ? Any errors in /home/admispconfig/ispconfig/ispconfig.log?
Thanks - find attached the requested info Code: mail:/etc/apache2/vhosts# ls -la /root/ispconfig/ total 120 drwxr-xr-x 9 root root 4096 Apr 29 16:04 . drwxr-xr-x 10 root root 4096 Apr 29 15:04 .. -rw-r--r-- 1 root root 8 Apr 29 16:04 .old_path_httpd_root -rwxr-xr-x 1 root root 51625 Apr 24 19:08 cronolog -rwxr-xr-x 1 root root 9673 Apr 24 19:08 cronosplit drwxr-xr-x 12 root root 4096 Apr 24 18:54 httpd drwxr-xr-x 14 root root 4096 Apr 24 19:08 isp drwxr-xr-x 6 root root 4096 Apr 24 18:47 openssl drwxr-xr-x 6 root root 4096 Apr 24 19:01 php drwxr-xr-x 4 root root 4096 Apr 24 19:08 scripts drwxr-xr-x 4 root root 4096 Apr 24 19:08 standard_cgis drwxr-xr-x 2 root root 4096 Apr 24 19:08 sv -rwx------ 1 root root 9389 Apr 24 19:08 uninstall mail:/etc/apache2/vhosts# mc and Code: mail:/etc/apache2/vhosts# tail /home/admispconfig/ispconfig/ispconfig.log 29.04.2007 - 16:04:59 => INFO - HTTPD_SYNTAX_CHECK: suexec 29.04.2007 - 16:04:59 => INFO - HTTPD_SYNTAX_CHECK: suexec 29.04.2007 - 16:04:59 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2417: WARNING: could not httpd -t &> /dev/null 29.04.2007 - 16:04:59 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2428: httpd syntax seems to contain errors, reloading with old configuration 29.04.2007 - 16:04:59 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2429: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf_29-04-07_16-04-59 29.04.2007 - 16:04:59 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2430: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf~ /etc/apache2/vhosts/Vhosts_ispconfig.conf 29.04.2007 - 16:04:59 => WARN - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 706: WARNING: could not /etc/init.d/apache2 reload &> /dev/null 29.04.2007 - 16:04:59 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 706: /etc/init.d/postfix stop &> /dev/null 29.04.2007 - 16:04:59 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 706: /etc/init.d/postfix start &> /dev/null 29.04.2007 - 16:04:59 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1891: cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~ So ispconfig detects in error through httpd -t and reverted to the previous vhost configuration. Code: mail:/etc/apache2/vhosts# httpd -t Syntax error on line 47 of /etc/apache2/vhosts/Vhosts_ispconfig.conf: Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration mail:/etc/apache2/vhosts# vhost config in question (i replaced my ip with "123.123.123.123" and the domain with "mydomain"): The trouble starts here: "php_admin_flag safe_mode Off" Code: mail:/etc/apache2/vhosts# cat Vhosts_ispconfig.conf ################################### # # ISPConfig vHost Configuration File # Version 1.0 # ################################### # NameVirtualHost 123.123.123.123:80 <VirtualHost 123.123.123.123:80> ServerName localhost ServerAdmin root@localhost DocumentRoot /var/www/sharedip </VirtualHost> # # ###################################### # Vhost: www.mydomain.de:80 ###################################### # # <VirtualHost 123.123.123.123:80> SuexecUserGroup web5_webmaster web5 ServerName www.mydomain.de:80 ServerAdmin [email protected] DocumentRoot /var/www/web5/web ServerAlias mydomain.de DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm ErrorLog /var/www/web5/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 <Files *.php> SetOutputFilter PHP SetInputFilter PHP </Files> <Files *.php3> SetOutputFilter PHP SetInputFilter PHP </Files> <Files *.php4> SetOutputFilter PHP SetInputFilter PHP </Files> <Files *.php5> SetOutputFilter PHP SetInputFilter PHP </Files> php_admin_flag safe_mode Off Alias /error/ "/var/www/web5/web/error/" ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /var/www/web5/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web5/user/$1/web/$3 </VirtualHost> # # php_admin_flag is a valid directive. I do not understand why itfails It's debian sarge - Here the output of the apache version used: Code: #mail:/etc/apache2/vhosts# httpd -v Server version: Apache/2.0.54 Server built: Sep 5 2005 11:11:08 mail:/etc/apache2/vhosts# When i remove the php_admin_flag / php_admin_value entries, i can start httpd. But of cause, when i create a new web, than this new web has the same issues. Regards Wolfgang //EDIT: 1.) It seems that this thread adresses a similar issue: http://www.howtoforge.com/forums/showthread.php?t=12380 2.) All of this happend after updating from ispconfig 2.6.9 to 2.6.12. 3.) It seems that the root cause is that the php module is no longer loaded in apache2. Unfortunately i am not fimilar with vhost configurations. So i do not no where to load what. However i see in /etc/apache2/mods.enabled that suphp is going to be loaded. Code: mail:/etc/apache2/mods-enabled# a2enmod Which module would you like to enable? Your choices are: actions asis auth_anon auth_dbm auth_digest auth_ldap cache cern_meta cgi cgid dav dav_fs deflate disk_cache expires ext_filter file_cache headers imap include info ldap mem_cache mime_magic proxy proxy_connect proxy_ftp proxy_http rewrite speling ssl suexec suphp unique_id userdir usertrack vhost_alias Module name? suphp This module is already enabled!
The above error occurs when the mod_php module ins not loaded or activated in your apache configuration. If you do not want to use PHP with mod_php, you will have to enable e.g. suPHP in the file /home/admispconfig/ispconfig/lib/config.inc.php
Thank you Till. Like i said, it worked before with ispconfig 2.2.9. Here an excerpt from config.inc.php: Code: mail:/home/admispconfig/ispconfig/lib# grep -i php config.inc.php $go_info["server"]["apache2_php"] = 'both'; // 'filter' = set PHP filters, 'addtype' = Set PHP addtype or 'both' = Set Filter + Addtype, suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2) mail:/home/admispconfig/ispconfig/lib# There is no other line refering to php. What else should i enable? Regards Wolfgang
[solved] Thanks Till, - I found it. Change Code: $go_info["server"]["apache2_php"] = 'both'; to Code: $go_info["server"]["apache2_php"] = 'suphp'; and it works. Basically i thought this line would refer to addtype etc., so i missunderstood the advise given. What i still do not understand is how to use the possible options though: Code: 'filter' = set PHP filters, 'addtype' = Set PHP addtype 'both' = Set Filter + Addtype, suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2) So in my case i use suphp. But what if i want 'suphp' and 'addhandler'? Regards Wolfgang
Thanks to all who helped with this problem. I had /Vhosts_ispconfig.conf empty and lots of backup files over there. Now it is working. Thanks again
What errors does Apache report if you replace Vhosts_ispconfig.conf with one of the backup files and do a manual `apache2ctl restart`? (be sure to backup your working Vhosts_ispconfig.conf before moving one of the others into its place) There should be something in the error messages that gives a clue as to where things are going wrong... please give us some details.
When i execute Code: php /root/ispconfig/php/php /root/ispconfig/scripts/writeconf.php I get the error: Code: PHP Warning: Module 'json' already loaded in Unknown on line 0 Parse error: syntax error, unexpected '=' in /root/ispconfig/php/bin/php on line 1146 Beacuse when i run Code: httpd -t i get sintax ok.
You use the wrong php version. ISPConfig can not be run with the php on your system. You must run instead: /root/ispconfig/php/php -q /root/ispconfig/scripts/writeconf.php and not the line you used above.
Yes, but when i try to add a domain in my vhost_ispconfig.conf doesnt write the configuration automatically.