|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi there
I would like to set up Apache so that when I go to /~user/ the browser automatically gets redirected to /home/user/public_html/ on my Linux computer. I've checked to see if mod_userdir is installed, and as far as I can see it IS. So that shouldn't be the problem. But I can only access files in the DocumentRoot Can anyone tell me how to set it up the right way? I've been browsing the docs on apache.org but so far that hasn't helped me much... I'd also appreciate it if you guys could point me to some good information resources on setting up things (especially Apache in this case but any good Linux information would help) (That would also help you 'cause I wouldn't have to bother y'all with newbie questions here )thanx, Richard |
|
#2
|
|||
|
|||
|
>> when I go to /~user/ the browser automatically gets redirected...
No redirection takes place here and you are using the wrong term. >> But I can only access files in the DocumentRoot Say you've got [403] error, the common mistake is that, you forgot to set the appropriate permission to public_html directory. In most Linux distributions (if not all), Apache runs as nobody by default. Here is an example: drwx------ 3 netamp netamp 512 May 1 16:57 public_html The user nobody can't access to your public_html because its permission is 700. drwx------, the first rwx represents owner's permission right, the 2nd drwx------ for group, while the 3rd drwx------ for all others. User nobody needs the 3rd one to be r-x. Put it all together, it becomes drwx---r-x and that's chmod 705 /home/netamp/public_html. You now have to chmod all those public_html to 705 manually. You should find out where skel (could be /etc/skel or /usr/share/skel) dir is and place a public_html (chmod 705) in it so any new user will get a public_html with 705 permission all setup automatically. Finally, if this is not your problem, tell us what error you were getting when trying to acess /~user/. |
|
#3
|
|||
|
|||
|
Thanks for the tip on skel.
However, the problem still persists. I run the SuSE Linux distribution. When I attempt to access /~user/ I get the following error: Forbidden You don't have permission to access /~netamp/ on this server. Even with the permissions set to 755: drwxr-xr-x 2 netamp users 4096 May 3 01:04 public_html Apache runs as: User wwwrun Group nogroup I don't really get it... where to start to solve this? ![]() |
|
#4
|
|||
|
|||
|
What's the permission for /home/netamp? Make sure it's not 700 (drwx------).
|
|
#5
|
|||
|
|||
|
OK I got that part working... so now I'm on to configuring further...
For some reason cgi scripts don't seem to be working right yet outside of the DocumentRoot (something about premature ending header) but I guess that's just a matter of time and trying stuff. Any tips would be helpful anyway, thnx for the replies, Cya |
|
#6
|
|||
|
|||
|
>> something about premature ending header
It could be a misconfiguration of Apache causing the [500] error or your script itself. You should start out with a hello world script and check your error log and solve the problem yourself. It's more than likely a Perl problem so post it to Perl forum. Should it be Apache problem, there should be an .htaccess file resides in the same directory or above of your CGI script which is using some Apache directive incorrectly. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > /~user/ & Apache stuff |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|