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 sites not added to Vhosts_ispconfig.conf? High server loads? (http://www.howtoforge.com/forums/showthread.php?t=11618)

jameso 24th March 2007 12:21

New sites not added to Vhosts_ispconfig.conf? High server loads?
 
Hi everyone,

I have ISPconfig running on a ubuntu server, and everything has been going well.

The other week I enabled suphp using this tutorial, and modifying the /home/admispconfig/ispconfig/lib/config.inc.php, setting $go_info["server"]["apache2_php"] to "suphp".

Things have been running ok since then, however I have been experiencing high server loads (at least 3), when beforehand the load was usually around 0.2. The server isn't receiving very many visitors.

Top shows that php is using approximately 35% CPU, and there are two or three PHP processes in the top window.

In addition, when I add a new site to ispconfig, I can only see the shared ip message page.

Upon looking in the Vhosts_ispconfig.conf file, no entry is created for the newly added site.

Looking in /home/admispconfig/ispconfig/ispconfig.log shows things such as:
Code:

24.03.2007 - 20:16:44 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 137: cp -fr /etc/postfix/local-host-names /etc/postfix/local-host-names~
24.03.2007 - 20:16:44 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 284: cp -fr /etc/postfix/virtusertable /etc/postfix/virtusertable~
24.03.2007 - 20:16:44 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 289: postmap hash:/etc/postfix/virtusertable
24.03.2007 - 20:16:44 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1230: cp -fr /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf~
24.03.2007 - 20:16:44 => INFO - HTTPD_SYNTAX_CHECK: suexec
24.03.2007 - 20:16:44 => INFO - HTTPD_SYNTAX_CHECK: suexec
24.03.2007 - 20:16:44 => INFO - HTTPD_SYNTAX_CHECK: suexec
24.03.2007 - 20:16:44 => INFO - HTTPD_SYNTAX_CHECK: suexec
24.03.2007 - 20:16:44 => INFO - HTTPD_SYNTAX_CHECK: suexec
24.03.2007 - 20:16:44 => INFO - HTTPD_SYNTAX_CHECK: suexec
24.03.2007 - 20:16:44 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2417: WARNING: could not httpd -t  &> /dev/null
24.03.2007 - 20:16:44 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2428: httpd syntax seems to contain errors, reloading with old configuration
24.03.2007 - 20:16:44 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2429: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf_24-03-07_20-16-44
24.03.2007 - 20:16:44 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2430: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf~ /etc/apache2/vhosts/Vhosts_ispconfig.conf
24.03.2007 - 20:16:46 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 706: /etc/init.d/apache2 reload &> /dev/null
24.03.2007 - 20:16:46 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1891: cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~

I understand that this means that apache is detecting a syntax error in the newly generated config, and then reloads the old configuration.

Running /root/ispconfig/php/php -q /root/ispconfig/scripts/writeconf.php produces the same result.

How can I go about fixing this problem, or the high loads problem?

I was thinking of disabling suPHP, but haven't been able to disable it and get PHP to work as it was before.

Any help would be greatly appreciated.

Hans 24th March 2007 12:35

If you use suEXEC, please disable it, as it is not compatible with suPHP.

One more question:

What is the output of your info.php file?

jameso 24th March 2007 12:48

Hi Hans, thanks for the quick reply.

How would I go about disabling suexec? It's listed in mods-enabled. If i do a2dismod suexec, then httpd -t, I get:
Code:

Syntax error on line 22 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
Invalid command 'SuexecUserGroup', perhaps mis-spelled or defined by a module not included in the server configuration

Do you mean phpinfo? If so, you can view it here.

Thanks!

Hans 24th March 2007 13:01

I had a quick view to info.php and it looks ok as far as i can see.

You can disable suEXEC with ISPConfig via > Management > Server > Settings > go to the tab "web" and disable suEXEC. I think if you do so, ISPConfig will rewrite the vhost file again, so you'll not have any error anymore.

jameso 24th March 2007 13:11

Hi Hans,

I disabled suexec, reloaded apache, and even tried editing a web site in ispconfig, and there is still an error showing in the ispconfig log file.

Hans 24th March 2007 13:19

Try to change a small option within ISPConfig for one of your websites.
For example enable or disable cgi-scripts, to make sure that ISPConfig re-writes your vhost file, which should be ok then.

If the error still persists within your log, please post it here.

jameso 24th March 2007 15:58

Hi Hans,

I have tried that, and the error still persists:
Code:

24.03.2007 - 23:55:51 => INFO - Signalfile Set: insert
24.03.2007 - 23:56:01 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 257: setquota -g web13 10240 11264 0 0 -a &> /dev/null
24.03.2007 - 23:56:01 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 258: setquota -T -g web13 604800 604800 -a &> /dev/null
24.03.2007 - 23:56:01 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 277: Connected successfully
24.03.2007 - 23:56:03 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 137: cp -fr /etc/postfix/local-host-names /etc/postfix/lo                                  cal-host-names~
24.03.2007 - 23:56:03 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 284: cp -fr /etc/postfix/virtusertable /etc/postfix/virtu                                  sertable~
24.03.2007 - 23:56:04 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 289: postmap hash:/etc/postfix/virtusertable
24.03.2007 - 23:56:04 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1230: cp -fr /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf~
24.03.2007 - 23:56:05 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2417: WARNING: could not httpd -t  &> /dev/null
24.03.2007 - 23:56:05 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2428: httpd syntax seems to contain errors, reloading with old configuration
24.03.2007 - 23:56:06 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2429: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf_24-03-07_23-56-05
24.03.2007 - 23:56:06 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2430: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf~ /etc/apache2/vhosts/Vhosts_ispconfig.conf
24.03.2007 - 23:56:08 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 706: /etc/init.d/apache2 reload &> /dev/null
24.03.2007 - 23:56:08 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1891: cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~

Do you know of anything else that may be causing this?

Thanks very much!

vogelor 24th March 2007 18:15

i have had the same problem. at my system this was NOT a problem with suexec.

The problem was that ISPConfig wrote phpadmin_xxx properties inside the OLD vhosts.

If you change to suphp that this old entries made the problem.

If there is a problem starting the apache, ISPConfig will use the OLD config instead of the new one.

to avoid the problem:
1) make a backup of the old config
2) edit the config and remove all the phpadmin entries
3) try to restart apache with the "new" file
4) enable suphp
5) let ISPConfig write the "new ISPConfig" file

i hope it is clear what i mean. if not ask ad i will help you more!

jameso 25th March 2007 01:37

Hi veogelor,

Thanks for your reply.

I am not quite sure what you mean. In my Vhosts file, an example vhost looks like this:
Code:

<VirtualHost xxx.xxx.xxx.xxx:80>
SuexecUserGroup web6_fwd web6
ServerName www.domain.com:80
ServerAdmin webmaster@domain.com
DocumentRoot /var/www/web6/web
ServerAlias domain.com
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/web6/log/error.log
AddHandler application/x-httpd-php .php .php3 .php4 .php5
suPHP_Engine on
suPHP_UserGroup web6_fwd web6
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php
Alias /error/ "/var/www/web6/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/web6/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web6/user/$1/web/$3
</VirtualHost>

I would like to modify this so suexec and suphp are not used, so I can see if suphp is causing the high server loads.

Thanks in advance.

falko 25th March 2007 15:00

Please double-check that you really disabled suExec in ISPConfig.

What's the output of
Code:

ls -la /etc/apache2/vhosts
? Are there Vhosts_ispconfig.conf files with a date appaneded to them? If so, take the last one, rename it to Vhosts_ispconfig.conf (please back up the current Vhosts_ispconfig.conf) and run
Code:

httpd -t
What's the output?


All times are GMT +2. The time now is 20:17.

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