[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Apache misconfiguration

Posted on 2000-02-22
7
Medium Priority
?
417 Views
Last Modified: 2013-12-16
Please help:

I did something, not entirely sure what, to mess up my Apache installation. Now all I get are 403's.

As I retrace my steps:

A) I upgraded the version of Apache that came with RH6.1 (1.3.9-4) to the latest version (1.3.11-5) with an RPM from rpmfind.
B) The upgrade seemed to go relatively smoothly except that the old documentation (html/manual/) was erased and the new one was not installed.
C) I upgraded my initscripts (with initscripts-4.70-1.i386.rpm).
D) It was either at this point, or directly after step B that I noticed httpd would not start.  It complained about a 'PerlHandler' line in httpd.conf.  I commented out that section, and httpd started without errors.
E) Now all I get are '403 Forbidden' messages. Uncommenting the lines from step D does not help. (I also don't even know Perl yet, so I don't think I want the module loaded.)

The directory permissions are correct (drwxr-xr-x) and I have tinkered with just about every setting vaguely relevent in httpd.conf.

I have also tried uninstalling (rpm -e) Apache, but rpm just tells me that it isn't installed (even though rpm -qa tells me it is).

As any expert will likely have guessed, I am a newbie, and have little to no idea what I am doing. At this point I don't care if I have to downgrade. I just want a simple Apache server running so I can educate myself.

Any ideas how to get me back in business?

Thanks in advance,
CubeDweller
0
Comment
Question by:cubedweller
  • 3
  • 3
7 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2548736
Have you looked in the apache logs to see what it claims the problem is?

Offhand I'd suspect that the apache is using the wrong conf file or the wrong apache is starting or the conf file isn't point to where the htdocs actually are.

Make sure you are actually running the apache that you think you should be by killing the existing httpd. Then check the conf file to see where it thinks the htdocs dir is (and that that dir exists and has the right content). Then start apache manually from the command line. If that works, you'll need to figure out what the init script is doing wrong.
0
 

Author Comment

by:cubedweller
ID: 2548878
Apache Error Log says:
[Tue Feb 22 22:29:58 2000] [error] [client 192.168.1.35] client denied by server configuration: /home/httpd/html

The script in inet.d that calls httpd defines the conf files correctly as:
# config: /etc/httpd/conf/access.conf
# config: /etc/httpd/conf/httpd.conf
# config: /etc/httpd/conf/srm.conf
(If I uncomment them, the script breaks.)

httpd.conf says htdocs are:
DocumentRoot "/home/httpd/html"
It is a directory that exists and has drwxr-xr-x permissions with an index.html file that has -rw-rw-r-- permissions.

The only Apache I can find is /usr/sbin/httpd.  It tells me that (via 'httpd -v') that it is v1.3.11. I can execute it directly, but I still get the same error.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2549048
The log error says that the server configuration is denying access to the client. Time to go looking at the config file. Late versions of Apache are usually built to only use the httpd.conf file. The others, access & srm, are always empty of directives. Since I always build Apache from source, I don't know what the default for access is, but it could well be that it's been set for something like:

  order deny,allow
  deny from all
  allow from localhost
 
Which would cause the error you've got.
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 

Expert Comment

by:perimus
ID: 2550070
Apache may have been compiled/installed with user-level access control, where it will su to a user's permissions before accessing documents.  To disable this, rename the suexe executable installed by apache to something else, such as:

mv /usr/sbin/suexe /usr/sbin/disable.suexe

Good luck!
0
 

Author Comment

by:cubedweller
ID: 2550732
Sure enough, my httpd.conf file looked like that.  I tried various alterations, like:
<Location /doc>
  order allow,deny
  allow from all
  Options Indexes FollowSymLinks
</Location>
But I still keep getting 403's.

I also renamed suexec, but that didn't help either.

Is there some way I can just rip the current Apache out and stuff a working version (maybe the older one?) back in?
0
 
LVL 40

Accepted Solution

by:
jlevie earned 180 total points
ID: 2551225
Something in the config file still isn't right. If you are familiar with Apache you could go through it, top-to-bottom, and make it work. I could probably find the problem, but I'd have to see the entire config file.

Alternatively, you could just remove the 1.3.11 (via rpm) and re-install the 1.3.9 from the RedHat CD.
0
 

Author Comment

by:cubedweller
ID: 2551700
Back in business.

Turns out, in my newbie-ness, I did not know that one should not append '.rpm' to an 'rpm -e' command.  With this lesson learned I was able to remove the broken Apache and reinstall the original version.

Thanks to everyone who helped.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month18 days, 23 hours left to enroll

834 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