[TAG] Please help me :(...
Ben Okopnik
ben at linuxgazette.net
Tue Oct 30 02:51:08 MSK 2007
On Mon, Oct 29, 2007 at 06:09:11PM -0500, Lin, Hong wrote:
> 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'.
--
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
More information about the TAG
mailing list