403 Forbidden???
I have finally got Apache running on my box without crashing, a large step in my Linux training. However, I am having a few problems understanding the following.....
I have an account setup called 'user' I can get the root site working fine (by putting htmls in var/www dir). But when I try to acces a user's site (http://localhost/~user) I get a 403 forbidden preventing me from seeing a dir listing. Also-when I try to access http://localhost/~user/file.html I get a forbidden error as well. What directive do I need to change to get rid of this? I haven't modified the httpd.conf file from the default that comes with Redhat 7.1.... Thanks, Jeff |
mkdir ~user/public_html
mkdir ~user/public_html
and put an index.html there? |
No, because to my understanding the path '/home/user' is represented on the web as 'http://localhost/~user'
Am I correct? Basicaly-I want people to be able to ftp in and upload their own sites and be able to access them via the web by 'http://localhost/users homepage' |
Try!
Try my suggestion above, and see if it works though.
Also, /home/user and /home/user/public_html must have appropriate rx permissions for the apache uid/gid (nobody) to read them. |
basically by default is is public_html under the UserDir in httpd.conf file in which you can change to whatever, some create a folder in the users directory called WWW or www and then change the following in httpd.conf under the UserDir directive.
create the public_html or change it to www and make the changes in httpd.conf then restart the server.. now place the html files in the users /home/www or /home/public_html directory and that should work for you. you should access their pages by typing in the domain followed by their /~user/index.html or whatever you have the html named. its best to start off with index.html as it will automatically load there. by default it is set to public_html , might want to check your httpd.conf file just in case if this is # commented out to bypass this option in or under UserDir |
Quote:
|
Yeah-I have the ftp set up just fine-and I have created a dir under /home/user called 'public_html'....
I think the problem is my permissions, how would I go about changing them? L:ike I said-the ftp is working fine, I can get into the /home/user dir just fine but when I make the dir 'public_html' and put my htmls in it-I get the 403 forbidden..... Any ideas? Jeff |
check your permissions, and you can change them with the chmod command..
|
All dirs are chmod'd to 755-still no luck!!!!!
Also-I just noticed that when I make a dir in '/var/www' (called' test') and try to access it from: http://localhost/test I get a dns error-although the httpd is still running fine, I can access any file in 'var/www' fine but anything in a sub-dir (other than cgi-bin) I get a dns error... I'm thinking my config files are extremely misconfigured. Anything anyone can suggest before I completely re-install apache? Jeff |
i have the ssame problem too ..... :confused: - i reinstall the apache already but still doesn't work.
|
I would like to know how to get access to a forbidden 403 account that i had access to not long o
|
403 forbidden error
When I did a fresh install of Mandrake 8.2 with Apache I got this error when trying to access my websites that I had stored on another drive. I was upgrading from NT 2000 using IIS 5.0 so I had my original websites that were working before stored on another drive.
I spent 3 days looking for a solution to the 403 error I was getting when I tried accessing my websites. I had everything setup correctly in Apache (at least I thought). And I kept dinking arounf with my virtual server settings. I even changed the path in Apache for my default website to make sure it was not a webpage error. My website pulled up fine when I did this but even though I duplicated the settings in my default site with the new Virtual site I created for my website I still got a 403 error. The solution: You need to make the changes in the directives. Once I added lines to my commonhttpd directive in Apache for my vitual server and the path where my websites were located I was then able to pull up my websites without this error showing up anymore. I have more information about the steps you go through to do this on my website. http://www.coloradobusiness.tv I hope this helps others who maybe having the same problem I was. |
All times are GMT -5. The time now is 02:07 AM. |