Solved

Major Apache Problem

Posted on 2002-04-24
24
260 Views
Last Modified: 2010-03-04
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?
0
Comment
Question by:choccarlm
  • 12
  • 10
  • +1
24 Comments
 
LVL 15

Expert Comment

by:samri
ID: 6965289
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
 

Author Comment

by:choccarlm
ID: 6965301
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
 

Author Comment

by:choccarlm
ID: 6965304
/home/httpd is still there
0
 

Author Comment

by:choccarlm
ID: 6965323
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
 

Author Comment

by:choccarlm
ID: 6965357
Is it worth reinstalling apache?
0
 

Author Comment

by:choccarlm
ID: 6965382
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
 
LVL 15

Expert Comment

by:samri
ID: 6965428
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
 

Author Comment

by:choccarlm
ID: 6965436
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
 
LVL 15

Expert Comment

by:samri
ID: 6965447
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
 

Author Comment

by:choccarlm
ID: 6965448
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
 

Author Comment

by:choccarlm
ID: 6965451
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
 
LVL 15

Expert Comment

by:samri
ID: 6965456
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:choccarlm
ID: 6965457
The first VH is there, and the document root exists. index.html is in there also.

apachectl configtest reported everything to be ok
0
 
LVL 15

Expert Comment

by:samri
ID: 6965466
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
 

Author Comment

by:choccarlm
ID: 6965469
I have set the permissions to 777 for the index page, but it still isnt working.
0
 
LVL 15

Expert Comment

by:samri
ID: 6965472
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
 

Author Comment

by:choccarlm
ID: 6965491
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
 
LVL 15

Expert Comment

by:samri
ID: 6965535
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
 
LVL 15

Expert Comment

by:samri
ID: 7031580
what is the outcome?  did you manage to get your apache up and running.

cheers.
0
 
LVL 1

Expert Comment

by:wolftales
ID: 7399002
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
 

Author Comment

by:choccarlm
ID: 7409264
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
 
LVL 15

Expert Comment

by:samri
ID: 7410503
no. prob.
0
 
LVL 15

Expert Comment

by:samri
ID: 8032256
is the problem solved, or do you need more time to decide?

cheers
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8297332
PAQ'd and points refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now