Solved

Apache misconfiguration

Posted on 2000-02-22
7
404 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Expert Comment

by:perimus
Comment Utility
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
Comment Utility
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 60 total points
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

744 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

16 Experts available now in Live!

Get 1:1 Help Now