Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old May 1st, 2001, 02:02 PM
NetAmp NetAmp is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Netherlands
Posts: 5 NetAmp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question

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

Reply With Quote
  #2  
Old May 1st, 2001, 08:16 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> 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/.

Reply With Quote
  #3  
Old May 3rd, 2001, 02:22 PM
NetAmp NetAmp is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Netherlands
Posts: 5 NetAmp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #4  
Old May 3rd, 2001, 11:11 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What's the permission for /home/netamp? Make sure it's not 700 (drwx------).

Reply With Quote
  #5  
Old May 5th, 2001, 03:13 PM
NetAmp NetAmp is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Netherlands
Posts: 5 NetAmp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile

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

Reply With Quote
  #6  
Old May 6th, 2001, 04:50 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> 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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > /~user/ & Apache stuff


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway