LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache 2.2 problem (https://www.linuxquestions.org/questions/linux-newbie-8/apache-2-2-problem-429232/)

sirajl 03-28-2006 06:11 AM

Apache 2.2 problem
 
i installed Apache . It iwas installed and working fine. I was able to get the default web page of apache. I made a website and installed it in /var/www/html/ . I was able to see the website.
Then i changed the website path /home/mywebsite/ . It gives 403 error. Says forbidden. I checked the error log it says permission denied on /home/mywebsite/.
I canged the permissions also it gives me the same error.
I would be very thankful for your help

paul_mat 03-28-2006 06:25 AM

this might be a dumb idea, but have you restarted apache

/etc/init.d/httpd restart

i see you've only made one post so i'll make sure you know how to change permissions

chown apache:apache -R /home/mywebsite

chmod a+rwx -R /home/mywebsite

have you enabled apache's access to home directories or have you just made the root directory of your apache server /home/mywebsite?

check out mywebsite listed below, there is a bit of information on apache, mostly 2.0, i'm just getting started on 2.2

sirajl 03-29-2006 06:02 AM

Thanks Paul,

I did whatever you suggested but I could not solve this problem. My directory is under root i.e. /home/mywebsite/

sirajl 03-29-2006 06:12 AM

Thanks Paul,

I did whatever you suggested but I could not solve this problem. My directory is under root i.e. /home/mywebsite/

paul_mat 03-29-2006 06:37 AM

what do you mean by /home/mywebsite/? have you changed the httpd.conf file to make the root directory of your apache server /home/mywebsite/? or is your website just at /home/mywebsite/ and your trying to access it?

if you are you'd probably want to add something like this into your httpd.conf

Alias /mywebsite "/home/mywebsite/"

so you can go to http://ip-address-of-apache-server/mywebsite

or change

DocumentRoot /var/www/html
to
DocumentRoot /home/mywebsite

sirajl 03-30-2006 04:33 AM

Thank you Paul for being patient with me. What I did that I gave the DocumentRoot path to /home/mywebsite.Then also It gave the same message. I deleted the apache and httpd directory by mistake. Now I have to reinstall Linux once again as my httpd is gone.
Can you please tell me the dummy way that if I want to put my website to some directory other than the default /var/www/html say /home/mywebsite how I should proceed. i am working on Red Hat Linux enterprise 4.0
Thanks so much.

sirajl 04-02-2006 08:17 AM

I reinstalled linux and changed the path of documentroot and now it is running fine.


All times are GMT -5. The time now is 08:23 PM.