Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th July 2010, 01:21
DrJohn DrJohn is offline
Member
 
Join Date: Aug 2007
Location: Portland, OR, USA
Posts: 66
Thanks: 8
Thanked 2 Times in 2 Posts
Default Apache2 fails to start

I added a new site, installed RoundCube, enabled ssl, and installed the default self-cert. This worked fine but I need a 'real' ssl certificate for webmail access in many situations. Thus, obtained a GoDaddy cert and installed the certificate via ispconfig's ssl panel. Restarted ispconfig, and that's where the trouble started.

Note: I updated ispconfig to 2.2.36 between installing the new site plus RoundCube, and adding the new cert.

Upon restarting ispconfig, Apache2 fails to start. This line is near the end of ispconfig.log:
Code:
...
24.07.2010 - 15:43:56 => WARN - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 755: WARNING: could not /etc/init.d/apache2 restart &> /dev/null
...
I found (from another thread here) that there were two instances of
Code:
Include /etc/apache2/vhosts/Vhosts_ispconfig.conf
in /etc/apache2/apache2.conf. Removed the second instance, but apache failed to restart. Restored the second instance (near the end) and removed the first, same result.

I manually restarted apache2:
Code:
User@Server:/var/log$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                         [fail]
No error message to the console. /var/log/apache2/error.log gives no clue. The syslog has no relevant entries either.

Any help on figuring this out?

Thanks!
Reply With Quote
Sponsored Links
  #2  
Old 25th July 2010, 10:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,340
Thanks: 810
Thanked 5,173 Times in 4,055 Posts
Default

Please run:

httpd -t

and post the output.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 25th July 2010, 17:57
DrJohn DrJohn is offline
Member
 
Join Date: Aug 2007
Location: Portland, OR, USA
Posts: 66
Thanks: 8
Thanked 2 Times in 2 Posts
Default

It gives this response:
Code:
root@m2a74am-vm1:/# httpd -t
httpd: bad user name ${APACHE_RUN_USER}
root@m2a74am-vm1:/#
I had removed the user names created in ispconfig (my previous post) but restoring /home/admispconfig/ispconfig/users and restarting ispconfig makes no difference.
Reply With Quote
  #4  
Old 25th July 2010, 18:23
DrJohn DrJohn is offline
Member
 
Join Date: Aug 2007
Location: Portland, OR, USA
Posts: 66
Thanks: 8
Thanked 2 Times in 2 Posts
Default

Chasing this down a little bit:

Code:
root@m2a74am-vm1:/etc/apache2# cat envvars
# envvars - default environment variables for apache2ctl

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2.pid

## The locale used by some modules like mod_dav
export LANG=C
## Uncomment the following line to use the system default locale instead:
#. /etc/default/locale

export LANG
root@m2a74am-vm1:/etc/apache2#
and
Code:
root@m2a74am-vm1:/# cat /etc/passwd | grep www-data
www-data:x:33:33:www-data:/var/www:/bin/sh
root@m2a74am-vm1:/#
is 33 a sane id for this user / group?
Reply With Quote
  #5  
Old 26th July 2010, 14:24
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,715 Times in 2,557 Posts
Default

Try
Code:
./etc/apache2/envvars && httpd -t
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 26th July 2010, 17:21
DrJohn DrJohn is offline
Member
 
Join Date: Aug 2007
Location: Portland, OR, USA
Posts: 66
Thanks: 8
Thanked 2 Times in 2 Posts
Default

Why the '.' at the front of ./etc/apache2/envvars && httpd -t ?
First I had to make envvars executable:
Code:
root@m2a74am-vm1:/etc/apache2# chmod +x envvars
root@m2a74am-vm1:/etc/apache2# /etc/apache2/envvars && httpd -t
httpd: bad user name ${APACHE_RUN_USER}
root@m2a74am-vm1:/etc/apache2#
Still the same result, though.
And:
Code:
root@m2a74am-vm1:/etc/apache2# export APACHE_RUN__USER=www-data
root@m2a74am-vm1:/etc/apache2# echo $APACHE_RUN_USER

root@m2a74am-vm1:/etc/apache2# export APACHE_RUN_USER="www-data"
root@m2a74am-vm1:/etc/apache2# echo $APACHE_RUN_USER
www-data
root@m2a74am-vm1:/etc/apache2# /etc/apache2/envvars && httpd -t
httpd: bad group name ${APACHE_RUN_GROUP}
root@m2a74am-vm1:/etc/apache2#
Reply With Quote
  #7  
Old 27th July 2010, 15:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,715 Times in 2,557 Posts
Default

The correct command is
Code:
./etc/apache2/envvars && httpd -t
The dot includes the /etc/apache2/envvars file so that the variables in it are available to the httpd command.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 28th July 2010, 00:34
DrJohn DrJohn is offline
Member
 
Join Date: Aug 2007
Location: Portland, OR, USA
Posts: 66
Thanks: 8
Thanked 2 Times in 2 Posts
Default

OK, but the result is the same:
Code:
root@m2a74am-vm1:/# ./etc/apache2/envvars && httpd -t
httpd: bad user name ${APACHE_RUN_USER}
root@m2a74am-vm1:/#
It runs from the root directory, but not in /etc/apache2. Is there really any difference between the above and running the two commands separately, in an interactive session?

-- John
Reply With Quote
  #9  
Old 28th July 2010, 15:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,715 Times in 2,557 Posts
Default

Try
Code:
. /etc/apache2/envvars && httpd -t
instead (with a space between . and /etc/apache2/envvars).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 28th July 2010, 16:56
DrJohn DrJohn is offline
Member
 
Join Date: Aug 2007
Location: Portland, OR, USA
Posts: 66
Thanks: 8
Thanked 2 Times in 2 Posts
 
Default

Code:
root@m2a74am-vm1:/etc/apache2# . /etc/apache2/envvars && httpd -t
Syntax OK
root@m2a74am-vm1:/etc/apache2# echo $APACHE_RUN_USER
www-data
root@m2a74am-vm1:/etc/apache2# ../init.d/ispconfig_server restart
Shutting down ISPConfig system...
/root/ispconfig/httpd/bin/apachectl stop: httpd (pid 1862?) not running
ISPConfig system stopped!
Starting ISPConfig system...
Apache/1.3.41 mod_ssl/2.8.31 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide us with the pass phrases.

Server www.myserver.com:81 (RSA)
Enter pass phrase:

Ok: Pass Phrase Dialog successful.
/root/ispconfig/httpd/bin/apachectl startssl: httpd started
ISPConfig system is now up and running!
root@m2a74am-vm1:/etc/apache2# httpd -t
Syntax OK
root@m2a74am-vm1:/etc/apache2
This did not start apache2. Here's ISP Server Status:Services from the Management tab:
Code:
Web-Server:  Offline
FTP-Server: 	Online
SMTP-Server: 	Online
POP3-Server: 	Online
BIND-Server: 	Online
mySQL-Server: 	Online
I would like to try deleting the ssl site and restarting, then restoring the site. This might make it impossible to know what's happening now, but I do have daily backups of all the files.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3.0.1.4 causes Apache to have too many open files gkovacs Installation/Configuration 29 27th February 2013 08:59
monitrc configuration for Debian ISPConfig 3 server Hans Tips/Tricks/Mods 2 27th March 2011 23:22
geronimo-jetty7-javaee5-2.2 fails to deploy war application vtapas Server Operation 0 3rd May 2010 13:35
Monit & Munin SamTzu HOWTO-Related Questions 1 4th May 2008 18:03
"Too many open files in system" problems Berry Installation/Configuration 3 10th November 2007 21:58


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


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