Can't get up the Apache Webserver

5 posts / 0 new
Last post
#1 Sun, 08/13/2006 - 10:54
pesja

Can't get up the Apache Webserver

As into another topic, I added only 2 domains. I could not reached them via another browser. Now I know the problem, the apache server is down. And I can't get it up again. Did a reboot, but with no luck.

When I want to bring it up I get the following error:

"Starting httpd: Syntax error on line 928 of /etc/httpd/conf/httpd.conf: The address or port is invalid [[FAILED]]"

I really did nothing strange (I come from a Plesk CP and learned not touch any configuration-files of a Linux CP box)

Does it something to have to do with my installation of VirtualMin Pro on CentOS 4.3? May I have to configurate some parameters after installing VirtualMin Pro. I don't expect so, because it's profiling as an out-of-the-box cp and CentOS meets the requirements of VMPro.

I have every confidence that someone will help me out.

Sun, 08/13/2006 - 15:47
Joe
Joe's picture

Hey Sjaak,

This is pretty simple to fix, though I'd like to figure out how you ended up with this configuration (I'm sure it's our fault, I just don't see it happening on our test boxes).

To fix it, browse to Webmin:Servers:Apache Webserver, and then click the "Networking and Addresses" icon. One this page, locate the "Addresses for name virtual servers" option. This needs to have a real address on your server. It can't be empty, and it should be followed by a port (:80).

My setting on Virtualmin.com is 70.86.4.226:80

Save your changes and restart the Apache server.

If you have something like this already, then there might be an issue with the VirtualHost configurations (might still be such a problem, even if this is empty or just ":80", since Virtualmin will have configured your VirtualHost fields with the wrong address). Those can be fixed individually by clicking on the server in the "Virtual Servers" section of the Apache Webserver page, scrolling down to the bottom "Virtual Server Details" section, and finding the field labelled "Address". This should have the radio button next to the free text field selected...and then enter the IP you used in the "Addresses for name virtual servers" field.

So, I'm not sure what causes this problem, but I've seen at least one other user run into it here...so it's gotta be reproduceable! ;-)

Holler if you continue to have any troubles.

Ooh, I know...You might have missed the Check Configuration step of installation! This comes after you first login--click on the Virtualmin Menu item in the left menu, and you'll have nothing but a button for checking configuration. I'm pretty sure this is where we pick up the IP of your system and get Virtualmin ready for action. This last step is covered in the Administrator's Guide, but probably not as clearly as it should be. We should probably also make it always pop up, when configuration checking is needed (it is needed after some upgrades, and some system changes).

Does this "Check configuration" step sound familiar, or do you reckon you missed it? (Still our fault for making it possible for you to miss an important step. Just curious if that's actually the source of your troubles.)

--

Check out the forum guidelines!

Mon, 08/14/2006 - 02:35
pesja

Thank's Joe,

after I restored the image I first did check the configuration procedure. After that it's working like I expected. I made two virtual server (one with externa dns-server) and the pointed to the right welcomepage. Thanks

Sun, 09/03/2006 - 22:17
AhmadF.

I have a similar problem.
I just downloaded webmin and virtualmin trial version.

Although I am very happy and pleased to see my instal of webmin go very smoothly.

I downloaded virtualmin as part of module for webmin (per instructions).

As I am trying to configure things via the GUI, I am kind of not sure. The GUI seems to be asking for .conf files per older versions of Apache i.e. apache_1.3 etc. Whereas I have Apache2...

When I go in and click on "Re-check and refresh configuration" for virtualmin - I see this:

=========================================

BIND DNS server is installed.

Mail server Postfix is installed and configured.

The Apache webserver does not appear to be installed on your system, or has not yet been set up properly in Webmin's Apache Webserver module. If your system does not use Apache, it should be disabled in Virtualmin's module configuration page.

.. your system is not ready for use by Virtualmin.

=========================================

So I clicked on "Apache Webserver module" in the above message and got the following message:

The Apache configuration file /etc/apache2/conf/httpd.conf does not exist. If you have Apache installed, adjust the module configuration to use the correct path.

=========================================

So here I clicked on "module configuration".

Then I choose the following:

Apache server root directory /etc/apache2
Path to httpd executable /usr/sbin/apache2
Apache version Work out automatically
Path to the apachectl command /usr/sbin/apache2
Command to start apache /etc/init.d/apache2 start
Command to stop apache /etc/init.d/apache2 stop
Command to apply configuration Use apachectl or HUP signal
Run stop and start commands
Command to re-read configuration Same as apply command
Path to httpd.conf or apache2.conf Automatic
Path to srm.conf Automatic
Path to access.conf Automatic
Path to mime.types Automatic
Path to Apache PID file Work out automatically

===============================================

Now with that said: I do know when I try to run the following command via terminal window (I have root access):

I get the following message:

poweruser@blazex:/$ sudo /etc/init.d/apache2 restart
* Forcing reload of apache 2.0 web server... Warning: DocumentRoot [[/var/www/sharedip]] does not exist
Warning: DocumentRoot [[/var/www/web9/web]] does not exist
Warning: DocumentRoot [[/var/www/web12/web]] does not exist

In the end it still gives the same error message:
=============================================

Here is the error message:

The Apache configuration file /etc/apache2/conf/httpd.conf does not exist. If you have Apache installed, adjust the module configuration to use the correct path.

Since this is Apache2, so then what is the correct file name? or some thing similar. Appreciate any help.

================================================

I did run this command from command line without an issue.

So this command seems to work:
sudo /etc/init.d/apache2 start

sudo /etc/init.d/apache2 stop

===========================================

Mon, 09/04/2006 - 16:23 (Reply to #4)
Joe
Joe's picture

Hey Ahmad,

Actually this is a completely different problem from Sjaak's. ;-)

There are at least two apparent problems on your system, and one area that I'm not sure what to make of.

The thing I'm unsure of is this:

<i>The GUI seems to be asking for .conf files per older versions of Apache i.e. apache_1.3 etc. Whereas I have Apache2...</i>

What makes you think the GUI is looking for Apache 1.3? What OS are you running Webmin on? If it's a really old OS version, the defaults for Webmin could very well expect Apache 1.3. But modern OS versions ship with Apache 2 by default and Webmin defaults to configuring Apache 2. There is no automatic detection of versions going on, and Webmin isn't &quot;asking&quot; for anything...it has default configuration files based on the detected OS during installation of Webmin. Unless OS detection failed, the paths and versions that Webmin expects should be exactly right for your OS. The only exception to this is if you have installed the package from some source other than native packages (not recommended, in my not so humble opinion), in which case, you have to completely re-configure Webmin's Apache module to know about your new package--none of the paths or commands will be correct.

Now, on to the obvious problems based on the errors you've reported:

First up, you need to make sure your paths are right. These errors tell me they are not correct (and I can't guess what paths might be correct--only you can know where you've installed your software...our defaults match the OS defaults from native packages provided by the OS vendor...if you installed via source, we have no clue where you put it and we don't try to guess, because it would make it very ornery to have multiple installs of something). Sometimes our defaults are wrong, when the OS changes locations from one version to another, but we try to keep them current and correct. Let us know if the defaults are wrong for a system running standard system packages, and it'll get fixed in the next version.

So, this error:

<i>The Apache configuration file /etc/apache2/conf/httpd.conf does not exist. If you have Apache installed, adjust the module configuration to use the correct path.</i>

Means exactly what it says. You need to find your httpd.conf and other configuration files and make sure the Webmin module knows how to find them. Without those, Webmin is helpless. If you don't know where the files are, use your package manager to find out, or use locate or find commands.

<i>Now with that said: I do know when I try to run the following command via terminal window (I have root access):

I get the following message:

poweruser@blazex:/$ sudo /etc/init.d/apache2 restart
* Forcing reload of apache 2.0 web server... Warning: DocumentRoot [[/var/www/sharedip]] does not exist
Warning: DocumentRoot [[/var/www/web9/web]] does not exist
Warning: DocumentRoot [[/var/www/web12/web]] does not exist</i>

This one is also exactly what it says. You've got domains configured in /var/www/*/* and the directories for them do not exist. If they don't exist, Apache issues warnings. Nothing to be done but make sure everything that Apache expects to exist actually does exist. Virtualmin didn't create these domains, as it also would have created the directories for them, and you wouldn't be getting these warnings.

<i>I did run this command from command line without an issue.

So this command seems to work:
sudo /etc/init.d/apache2 start

sudo /etc/init.d/apache2 stop
</i>

I'm not sure how this could happen without warnings, if the restart generates the errors shown above. Sounds like a bug in the initscript if it hides warnings on start but not on restart (though it is merely an odd and mostly harmless thing for the initscript to do).

--

Check out the forum guidelines!

Topic locked