Please help me :(...

I received a "Forbidden / You don't have permission to access
/~user/index.html on this server." Error while I try to display my web
page.

The OP is Fedora 7
Apache is 2.2.6

Permissions of all directories and files are set to rwxr-xr-x leading
from /home all the way to the files inside public_html.

I have modified the httpd.conf file to make sure it looks for the
/~user/public_html directory.

I did not touch any other file or area.
If I "killall httpd" and run /usr/sbin/httpd, then the index.html under
the /~user/public_html displays. That means that it seems worked for my
purpose.

However, after I run "/etc/init.d/httpd restart", it displayed stopping
httpd [ok] starting httpd [ok], but I will not be able to see my
index.html file under the /~user/public_html

The system index.html (the testing page) always worked.

The wired thing is after I taking out all the #lines within the
/etc/init.d/httpd file, I can use "/etc/init.d/httpd restart" to make it
work.

However, when the machine reboots, it does not work again. I have tried
to put "/etc/init.d/httpd restart" at end of the rc.local to force the
web serve stop and start at the boot. The server will stop and then
start, but it does not display my web page.

I have also tried to put "/etc/init.d/httpd stop" and "/usr/sbin/httpd"
at end of rc.local. It does not display my web either.

The S85httpd is linked with .../init.d/httpd

I have tried with "/usr/sbin/apachectl start", it does not work either
manually or inside the rc.local

Here is the summary:

Manually /usr/sbin/httpd worked (after I killed all the httpd process)

Manually /etc/init.d/httpd worked (only after I took out all the #lines,
and I don't know why it matters)

> Hi:
>
> I have a wired problem and I hope I can get some help in your place.

I'm assuming you mean "weird"; otherwise, I'd be trying to figure out
how your Ethernet cable figures into this problem.

> I received a "Forbidden / You don't have permission to access
> /~user/index.html on this server." Error while I try to display my web
> page.
>
> The OP is Fedora 7
> Apache is 2.2.6
>
> Permissions of all directories and files are set to rwxr-xr-x leading from
> /home all the way to the files inside public_html.
>
> I have modified the httpd.conf file to make sure it looks for the
> /~user/public_html directory.
>
> I did not touch any other file or area.
> If I "killall httpd" and run /usr/sbin/httpd, then the index.html under
> the /~user/public_html displays. That means that it seems worked for my
> purpose.
>
> However, after I run "/etc/init.d/httpd restart", it displayed stopping
> httpd [ok] starting httpd [ok], but I will not be able to see my
> index.html file under the /~user/public_html

Question number one: is Apache the only web server that you have
installed? What is '/usr/sbin/httpd' - is it a binary, a link to a
program, or what? I've run into this kind of problem before (PHP would
or would not work, mysteriously, until I figured out that I was starting
one of two different web servers.)
Some tests you could run:

file /usr/sbin/httpd
strings -a /usr/sbin/httpd
/usr/sbin/httpd -h

Conversely, you could try

whereis apache
whereis apache2

> The system index.html (the testing page) always worked.
>
> The wired thing is after I taking out all the #lines within the
> /etc/init.d/httpd file, I can use "/etc/init.d/httpd restart" to make it
> work.
>
> However, when the machine reboots, it does not work again. I have tried
> to put "/etc/init.d/httpd restart" at end of the rc.local to force the web
> serve stop and start at the boot. The server will stop and then start,
> but it does not display my web page.

Your startup scripts may be starting one server, whereas you may be
starting a different one. Do realize, by the way, that the control
script for apache2 is called 'apache2ctl', not 'apachectl'.

When you ask for help on a list, you need to keep the list CC'd on
subsequent replies unless you've received a specific request to do
otherwise. These discussions are intended to serve the Linux community;
taking the conversation off the list defeats that intent. Please make
certain that tag at lists.linuxgazette.net is in the loop for the rest of
this discussion; thanks.

On Mon, Oct 29, 2007 at 07:13:46PM -0500, Lin, Hong wrote:

> Thanks Ben:
>
> I believe Apache the only web server that you have installed.

OK... what is that belief based on? In other words, have you queried the
RPM database to see what you have installed? I'm not saying that you
definitely have something else there - I'm saying that you should
definitely establish that you don't.

> However
> there are 9 httpd running when it is boot.

That's pretty typical for Apache. Is that true in all the cases - i.e.,
in those where /~user/index.html is available and where it's not?

Ugh. Please don't quote all the previous material; it wastes
bandwidth. I suggest that you read "Asking Questions of The
Answer Gang" at http://linuxgazette.net/tag/ask-the-gang.html to get
some idea of list etiquette, so you can avoid conflict when asking
questions on lists.

>
> Hi Ben:
>
> How can I check how many different web services it is running?

How many it's running at any one time should be pretty easy: one, unless
you've set something up to run on a non-standard port (and you'd most
likely know it if you did.) If you have 'lsof' installed, you could look
at all the ports where your system is listening by executing