Major Apache Problem

Hi,

I was deleting users from our mail server, and also removing mail spools and home directories. This server also runs a website, but the website no longer works. I keep getting a 403 error. I've checked all the permissions, and they seem to be fine. What could be causing this?
choccarlmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

samriCommented:
403 - Not found error:  Most likely you might have wiped out your DocumentRoot for good. :(

OS make/Version?
Apache version?

Depending on your Apache version; I believe some version of apache would be sitting in /home/httpd, or /home/apache.

If this is the case, look for your backup media- if there is any.

Another thing, try to locate you httpd.conf (apache config file), normally it would be in /usr/local/apache/conf/httpd.conf, or for RedHat it might be in /etc/httpd/conf/httpd.conf

Once you locate it, look for "ServerRoot" or "DocumentRoot" directive.   Locate that path in you filesystem.  If they are still around, you chaces are pretty bright, otherwise, ... depends on how bad it is.


awaiting..
0
choccarlmAuthor Commented:
Hi,

All the documents are still there. I hashed out (#) the virtualhost directive for the website, and I'm still getting a 403 error, when I would have expected to get "Page Not Found" 404 error. It seems as though it's not reading the conf file anymore
0
choccarlmAuthor Commented:
/home/httpd is still there
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

choccarlmAuthor Commented:
I renamed /etc/httpd/conf/httpd.conf to httpd.conf.bak and then tried to restart apache, but it said that it couldnt detect the conf file, so it is reading the conf file. I've tried everything I can think off, but Im not that good with apache, soI dont really know what else to try.

0
choccarlmAuthor Commented:
Is it worth reinstalling apache?
0
choccarlmAuthor Commented:
In the error logs, im getting

[Wed Apr 24 12:23:44 2002] [notice] child pid 913 exit signal Segmentation fault (11)

Could this be the problem?
0
samriCommented:
Apology - just got back home.

I'm not sure what went wrong.  Personally I would have proceed to upgrade the apache, or reinstall it.  In most cases, the configuration would be intact.  Just make a copy of /etc/httpd/conf dir somewhere, and go ahead to reinstall.  Grab a copy from http://httpd.apache.org/dist/ 

If you care to still work on the existing setup, try to watch for error in the logfile when you opne the page.  The 403 error should register in the logfile.

btw, 403 - Forbidden (not Not found as I mentioned earlier).

Try to browse to http://yourserver/index.html

How about the DocumentRoot for each Vhosts? Remember that you must hashed (#) out all the VirtualHost, and the NameVirtualHost directive.

If you plan to upgrade, rename the current httpd.conf (or better the whole conf directory), and proceed with installation.  THe installer should create one for you with the default httpd.conf (new one).  After that, start the apache, and should everything is OK, reaplly the setting from your original config file.  I would presume that this is the cleanest way, but time consuming.  Better still, use the same approach, but once the installation completed, start apache and make sure everything is OK.  Next, backup the new config, and copy the old config back to httpd.conf.  If something in the existing (old apache) configuration is causing the server to "not" starting, Apache should have prompted you with and error during startup.  It's good to check the configuration with apachectl configtest prior to starting the daemon.

good luck.
0
choccarlmAuthor Commented:
I removed apache, php, php-mysql and mod_php. I then installed apache, apache common, php, php-mysql and mod_php. I restared apache, and I got the "Welcome to Apache" page. I then added my Virtual hosts directive's underneath the end of the httpd.conf file and restarted. Im now getting the same error again.
0
samriCommented:
Remember that when you configure your server to do VirtualHosting, the first defiend VH would be the default VirtualHost.  Make sure that the DocumentRoot in the first defined VH, is OK, ie, the directory exist, and the default document (as defined in DirectoryIndex) is there.

Did apachectl configtest detect any error?
0
choccarlmAuthor Commented:
What rpms do I need to remove to completely uninstall apache? I also have php and mysql on the server, do I need to unistall those aswell. How wbout mod_ssl and mod_perl, mod_php?

Sorry, I really am quite new to apache.
0
choccarlmAuthor Commented:
What rpms do I need to remove to completely uninstall apache? I also have php and mysql on the server, do I need to unistall those aswell. How wbout mod_ssl and mod_perl, mod_php?

Sorry, I really am quite new to apache.
0
samriCommented:
And the permission is correct, at least 711 (read access for apache user/group).

We are getting to the right track now.  At least we knew that something about VH is causing the 403.  Most common is due to the fact that by default global apache configuration would not allow directory browsing.  In order words, in each directory, there must be index.html (by default), otherwise, you will get 403 error.
0
choccarlmAuthor Commented:
The first VH is there, and the document root exists. index.html is in there also.

apachectl configtest reported everything to be ok
0
samriCommented:
I'm not that expert in rpm.  In most cases "rpm -e pkgname" would erase the package.  However, due other packages might depends on apache, which would cause the rpm to failed.  One option is to do "rpm -e -t pkgname", would list all dependencies.  Next is to remove all dependencies.  Later, reinstall them back.

Anyhow, I would not suspect that you problem might have related to other packages.  It seems that VH is causing the problem.

We seems to be moving quite fast really, and our discussion seems to be "out-of-sync".  

Please try the proposed comment on creating the default VirtualHost, and create the default index.html first.

0
choccarlmAuthor Commented:
I have set the permissions to 777 for the index page, but it still isnt working.
0
samriCommented:
I'm not that expert in rpm.  In most cases "rpm -e pkgname" would erase the package.  However, due other packages might depends on apache, which would cause the rpm to failed.  One option is to do "rpm -e -t pkgname", would list all dependencies.  Next is to remove all dependencies.  Later, reinstall them back.

Anyhow, I would not suspect that you problem might have related to other packages.  It seems that VH is causing the problem.

We seems to be moving quite fast really, and our discussion seems to be "out-of-sync".  

Please try the proposed comment on creating the default VirtualHost, and create the default index.html first.

0
choccarlmAuthor Commented:
I have now removed all rpms to do with apache, php and mysql. What do I need to install to get apache back?

I have:

apache-1.3.14-2mdk.i586.rpm
apache-common-1.3.14-2mdk
apache-mod_perl-1.3.14_1.24-2mdk

I've also read that I could experience segementation faults with mod_perl and php being built in the same binary. I read this at

http://perl.apache.org/preview/modperl-site-ok/docs/1.0/guide/troubleshooting.html#_exit_signal_Segmentation_fault__11___with_mysql
0
samriCommented:
Yes you might.  I am running mine: OS Rh7.2, Apache 1.3.24, no problem.

Perhaps you might want to grab yourself a newer Apache version.

Grab a copy from http://rpmfind.net/

http://rpmfind.net/linux/rpm2html/search.php?query=apache

Sorted by Name.  Wait for the page to finish loading since it's quite big (damn... I'm on dial-up).
http://rpmfind.net/linux/RPM/AByName.html

Browse thru your OS version, and grab a copy.

Based on your rpm pkg, I would presume that you are running Mandrake.  These might be your best choice:

http://rpmfind.net/linux/RPM/cooker/cooker/i586/Mandrake/RPMS/apache-mod_perl-1.3.24_1.26-1mdk.i586.html
http://rpmfind.net/linux/RPM/cooker/cooker/i586/Mandrake/RPMS/apache-common-1.3.24-1mdk.i586.html
http://rpmfind.net/linux/RPM/cooker/cooker/i586/Mandrake/RPMS/apache-modules-1.3.24-1mdk.i586.html
http://rpmfind.net/linux/RPM/cooker/cooker/i586/Mandrake/RPMS/apache-conf-1.3.24-1mdk.i586.html
http://rpmfind.net/linux/RPM/cooker/cooker/i586/Mandrake/RPMS/apache-manual-1.3.24-1mdk.i586.html



Well there are too manu variation.  As long as the version is the same, it should be ok.

good luck.
0
samriCommented:
what is the outcome?  did you manage to get your apache up and running.

cheers.
0
wolftalesCommented:
Re-install may work for you, but it doesn't address why you no longer have access.

For the record since this is old . . .

However , this sounds more like some permissions got reset on upper level directories during the data migration/shuffle.

check to make sure your permissions are set correctly for all directories, including those above documentroot, etc.  The process needs sufficit priveldge to decend through those directories as the user it is running as.  I have seen upper level directory permissions get changed and all access to the directories below come back 403 because of insufficent permissons.
0
choccarlmAuthor Commented:
In order for me to get the sites working again, I had to delete and remove each users webspace, and then add the user and the contents again. I have no idea why this happened, but that was the solution.

Thanks for the help anyway guys
0
samriCommented:
no. prob.
0
samriCommented:
is the problem solved, or do you need more time to decide?

cheers
0
SpideyModCommented:
PAQ'd and points refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.