Apache has crashed!


My apache does not seem to be configured correctly and cannot boot up after using Virtualmin. my folder, public_html does not appear to exist.

Can you offer some additional details about your setup, what’s not working, and what errors you’re seeing?

First, the Apache log files should have info about why it’s not starting up.

As to where your public_html folder went, is it possible it was accidentally deleted?

It’s also possible that’s the problem – you may need to re-create that, and make sure the logs directory in $HOME/logs/ exists.

Could I email or IM?

Folder does not exist. I had imported the virtual server, similar to the one that was already configured. with a similar directory, upon removing the virtual server, it removed the public_html directory, and shutdown apache. Apache cannot locate the ROOT directory.

We need to see error messages! Seriously. We can’t help you, if you don’t provide useful information about the problem.

The troubleshooting common problems guide tells you where to look for logs, and you should see errors when attempting to start Apache, if the startup fails.

Start Apace:…

Starting httpd: Syntax error on line 263 of /etc/httpd/conf/httpd.conf
DocumentRoot must be a directory

So what is on line 263 of httpd.conf?


Really, that’s the entirety of the line? It doesn’t say “DocumentRoot /var/www/html/site/public_html”? I’m asking for the exact and entire line. If what you’ve given is the line, obviously it’s wrong…but since the error mentions DocumentRoot, I presume that isn’t the whole line.

OK, so /var/www/html/site/public_html doesn’t exist? How was this virtual host created?

DocumentRoot /var/www/html/site/public_html

i had imported a configurations. the new server on virtualmin contained old parameters.

i had imported a configurations. the new server on virtualmin contained old parameters.

I don’t think I understand what you’re saying here.

Is this a virtual server that you deleted (and should be gone)?

Or, was it an existing virtual server, and you imported it into Virtualmin, and it should still exist?

The thing I’m not really understanding is that when I read over this again, it sounds kinda like you’re suggesting that importing a virtual host into Virtualmin deleted this directory. Which simply couldn’t happen…unless you imported the virtual server, and then deleted it.

I’m simply not understand what you’re trying to do here, or what when wrong when you tried to do it.

an existing virtual server, it should still exist

The core default virtual one.

OK, so two things spring to mind. One is merely a comment, the other is another question to hopefully help me understand what’s going on:

You said you imported something into Virtualmin. Did you import the default virtual host into Virtualmin? It makes no sense to “import” the default configuration, as it has no user accounts associated with it–there’s pretty much nothing to import. It’s not a virtual hosting configuration–it’s for when you aren’t virtual hosting. Disabling it, or just leaving it alone, are the only sensible things you can do with it the “default” virtual server when switching to virtual hosting with Virtualmin (or any other sort of virtual hosting). The “default” is going to be owned by the Apache user, which is a special user that would not be suitable for use as a Virtualmin user account. If you have a website setup there, the solution would be to create a new virtual server in Virtualmin, and copy the data over–but you’ll still need to update ownership and such of that data.

Now the question: What is in /var/www/html/? That’s probably what ought to be in that DocumentRoot, by the way–it’s the default location for web data in a default Apache configuration on RHEL and CentOS. (And /home is the default location for virtual hosts under Virtualmin.)

the documentroot was removed, when i linked it virtually, with no backup. var/www/html/site is my virtual server address, thats where i pointed virtual min to… upon removing the user svn.virtual. it deleted the profile as well as site. Had forgotten it was linked to it. How does Virtual min work when deleting a domain?

upon removing the user svn.virtual. it deleted the profile as well as site.

So, you had set the home directory of this user to the directory of /var/www/html/site, and then you deleted the user and all of its files. This is pretty much expected behavior, isn’t it?

If you don’t have backups, I don’t have any useful advice. (Though, I guess I should be very clear: Importing a “default” server configuration in Apache like this doesn’t make any sense–you can’t usefully manage such a configuration in Virtualmin, as it has no associated accounts and users and such. The import is intended for importing VirtualHost configurations that have users and home directories and such.)

And, of course, please make use of the many backup capabilities found in Virtualmin and Webmin–there’s lots of documentation about it in the docs wiki here and in the Webmin wiki. Any kind of backup would solve your problem right now with no pain. Mistakes are always less dramatic when you have a backup of your data.