HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   New subdomains not added to Vhosts_ispconfig.conf? (http://www.howtoforge.com/forums/showthread.php?t=7719)

kuckus 26th October 2006 20:35

New subdomains not added to Vhosts_ispconfig.conf?
 
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

Quote:

...
Today, I created a new subdomain again, using ISPConfig 2.2.7.
When I use my browser and visit http:// subdomain.myhostingcompany.tld, I do not see the expected site, but the Shared-IP default site.
...
- 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

till 27th October 2006 13:13

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.

danielos 14th November 2006 11:24

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

till 14th November 2006 11:32

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.

Dytech 9th December 2006 16:20

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

Ovidiu 15th March 2007 17:37

Quote:

Originally Posted by till
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.

ok, I did those steps and get this error:

Quote:

Syntax error on line 74 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
can't get fastcgi file info: /usr/bin/ruby /var/www/web2/web/dispatch.fcgi, errno: 2
I removed that line, as that was done during an earlier testing phase and everything runs smoothly now.

thx for the debug help :-)

Wolfgang 27th April 2007 20:33

Hello,

i had a similar issue. On my system the line in bold caused the issue:
Code:

...
<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
...

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.)

falko 28th April 2007 19:18

What's the output of
Code:

ls -la /root/ispconfig
? Any errors in /home/admispconfig/ispconfig/ispconfig.log?

Wolfgang 29th April 2007 16:24

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 webmaster@mydomain.de
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:confused:

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!


Wolfgang 30th April 2007 12:39

Anyone having an idea?


All times are GMT +2. The time now is 06:34.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.