debian etch, apache 2.2.8 start problem

Hi guys,

Having some problem with start apache 2.2.8 from webmin’s “Apache Webserver” Interface.

If I click on the "start apache" link at the top right corner, I will always get an error message stating
"Failed to start apache : Apache does not appear to be running :

Starting web server: apache2"

This does not happen if I log in via ssh and restart my apache using /etc/init.d/apache2 restart or
/etc/init.d/apache2 start or
/etc/init.d/apache2 stop

Any idea why this might be so?

Regards,
Calvin

This additional information might be helpful to whoever is kind enough to give me a hint… In /etc/webmin/apache/config file, it reads:-

k_dir=/etc/apache2/sites-enabled
test_manual=0
show_list=0
mime_types=/etc/apache2/mime.types
access_conf=/etc/apache2/access.conf
auto_mods=1
stop_cmd=/etc/init.d/apache2 stop
virt_file=/etc/apache2/sites-available
test_apachectl=1
max_servers=100
srm_conf=/etc/apache2/srm.conf
httpd_dir=/etc/apache2
start_cmd=/etc/init.d/apache2 start
show_order=0
test_always=0
httpd_conf=/etc/apache2/apache2.conf
test_config=1
httpd_path=/usr/sbin/apache2

Something wrong with one of the configuration variables???

Thanks for any advice.
Calvin

Yes, there is no such configuration directive as "k_dir". It should be link_dir

But I’m not sure that would prevent things from working. Are the configuration paths actually correct? Is the Apache pid file in the normal location for Debian?

Hi Joe,

Super fast reply. Thank you. :slight_smile:
Sorry. typo on my part. It’s link_dir in my config file.

Yes. /var/run/apache2.pid exists and is where it should be on debian.

Is there any other issues I need to check? Permissions issue?

Regards,
Calvin

Something to note is that it was the webmin "Start Apache" and "Restart Apache" links were working perfectly fine before I upgraded Apache to 2.2.8. It was working well when I was running Apache 2.2.6.

Could that be an indicator of some issue with webmin running Apache 2.2.8?

Anyone? Any idea on what could be preventing webmin from reading Apache 2.2.8’s status while on the other hand, when I manually run /etc/init.d/apache2 restart or start or force-reload or stop commands, everything works perfectly at command line?

It’s gotta be the pid file. That’s how Webmin knows whether Apache is running or not. Make sure it points to the right place. Presumably it moved in the more recent version of Apache.

Hi Joe,

Thanks for your support again. I ran
"find / -name apache2.pid" and it is revealed that the apache2.pid file exists in
"/var/run/apache2.pid"

How can I instruct webmin to know that apache2.pid exists in that location? The /etc/webmin/apache/config file does not seem to have such a setting.

Click "Module Config" in the Apache module.

Got it! :slight_smile:

Thanks for your help! Webmin reads the pid file now and all is good.

Holy crap, you’re running the Ubuntu Abomination! Run for the hills! (Putting invalid syntax into a configuration file for the convenience of a couple of lazy developers is a great wrongness in the force, and shame and scorn be upon them for their evil ways.)

Upgrade to Webmin 1.411, which knows how to deal with this abomination. (Because they were too damned lazy to parse the Apache configuration file, every other administrative tool that knows how to parse the Apache file has to be updated to deal with the garbage they’re putting in the file.)

I feel strongly about this issue, can you tell? :wink:

In particular, if I check my envvars file, I see

export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2.pid

Is this supposed to be correct? And is it the cause of the bad user name I see in webmin?

So, the Debian folks have adopted the same horrible practice. Makes a fellow unhappy to know it…as this was one of the reasons I like Debian better than Ubuntu for servers–it’s a really bad direction to go in, and if they do it for all of their services, it will become a wholly unusable mess.

Maybe it’s not debian’s fault… I could have accidentally chown on the wrong directory, preventing webmin from running the /etc/init.d/apache2 start/restart/stop/force-reload commands.

Is there anyway I can check that the file or folder permissions are correct? If so, which folder should I look into?

No, it’s definitely not Webmin’s fault–this is evil committed by the Debian and Ubuntu folks.

But you’ll still need to upgrade to 1.411 if you’re going to use that configuration file. No version before 1.411 knows about those variables (which are post-processed by the rc scripts that start Apache).

And it’s not your fault, either, in case I wasn’t clear. These variables in an Apache configuration file are not normal or valid httpd.conf syntax, but they are a default part of the Ubuntu Apache package (and apparently now the Debian package).

Ok… so if i do a

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.410_all.deb
and then run
dpkg -i webmin_1.410_all.deb

It should work out…
I am also running Version 3.49.gpl Virtualmin. Will this cause problems with webmin 1.410 after I upgrade my current webmin 1.380?

Thank you for being patient with your answers.

No. I said 1.411. 1.410 does not support these variables. 1.411 is a development version.

Older versions of Virtualmin will be fine…but you really should be running the latest version at all times. We don’t build new versions for our healt. We build them because they’re better–fewer bugs, more features, better usability, etc.

Alright :slight_smile:
I will check for 1.411… looking at http://sourceforge.net/project/showfiles.php?group_id=17457 it seems 1.411 is not yet available… Do you have an SVN repository for it or something?

Dude, look at the Webmin website. There’s a Development Versions link right on the front page! :wink: