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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old February 1st, 2001, 07:44 PM
D-Bugger D-Bugger is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 6 D-Bugger User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy

Hi,

Problem:
I installed Apache (1.3.14 on RH7 Linux, kernel 2.4.0-ac11)
configured it for multiple v-hosts. Until now, no problem.
I have some users (including myself) who want to host 1 or more TLDs on my server. So it would be great if I could configure the v-hosts to have their document root on /home/<username>/www
I tried this, but I always get a 403 if I go to the v-hosts URL. If I put the website under /var/www/html/<username> (and ofcourse change it in httpd.conf!) then there is no problem ... the only thing I can think of, is that apache doesn't have rights to access /home/<username>/www, but I can't think of a solution to fix my problem. (I want the doc-root in the home-dir (and 1 Unix-user per website) so users kan change their website using ftp (proftpd chroot'ed to the user's home-dir (=can't have a symlink to /var/www/html/<username> ))

Who can help me? (I'm sure there are solutions for this problem, but right now, I just can't think of any (nor find any on the web!)

Thanks,

Bugger.

Reply With Quote
  #2  
Old February 2nd, 2001, 01:31 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
>>If I put the website under /var/www/html/<username>

What is the ls -Al output (don't tell me what permission you think it is) of /var/www/html/username?

How about the output of /home/username/www as well?

In your current httpd.conf, is there any UserDir directive somewhere?

What is the User and Group in your httpd.conf?

Reply With Quote
  #3  
Old February 2nd, 2001, 02:27 PM
D-Bugger D-Bugger is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 6 D-Bugger User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>What is the ls -Al output (don't tell me what permission you think it is) of /var/www/html/username?

[root@devet001 /root]# ls -Al /var/www/html/
drwxr-xr-x 2 devnet users 82 Feb 1 21:04 devnet
drwxr-xr-x 2 root root 59 Feb 1 20:27 linuxnet
drwxr-xr-x 19 root root 494 Feb 2 13:50 phpnet

(-> All 3 websites work fine like this)


>How about the output of /home/username/www as well?

[root@devet001 /root]# ls -Al /home/devnet/
...
drwxr-xr-x 2 devnet users 57 Feb 1 16:20 www


>In your current httpd.conf, is there any UserDir directive somewhere?

UserDir www


>What is the User and Group in your httpd.conf?

User apache
Group apache

Reply With Quote
  #4  
Old February 2nd, 2001, 09:52 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
>>I can think of, is that apache doesn't have rights to access /home/<username>/www
Based on your setup, user apache has access to /home/devnet/www given you have drwxr-xr-x for www directory for apache user to access.
The problem could be the following block:

<Directory /home/*/www>
..no affect here
..no affect here
<Limit xxx yyy zzz> #problem here
..
..
</Limit>
<LimitExcept aaa bbb ccc> #could be another problem here
..
..
</LimitExcept>
</Directory>

So it's not permission problem with your directories/files but a tiny misconfiguration of your httpd.conf
Check out -> http://httpd.apache.org/docs/mod/core.html#limitexcept

Keep in mind, I assume that Directory block above is within a <VirtualHost NameVirtualHost.ip.address.here>
DocumentRoot /home/username/www
ServerName that.vhost.com
..
..
..
</VirtualHost>

Note, which this setting, your UserDir directive is no longer needed. You have hardcoded your httpd.conf and have told apache to use /home/username/www as the docroot of particular vhost.

Reply With Quote
  #5  
Old February 3rd, 2001, 09:35 AM
D-Bugger D-Bugger is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 6 D-Bugger User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
OK, I found the solution for my problem: the home-dir of a user is created with following rights: drwx------

I changed that to drwxr-xr-x (might be a bit more "insecure", however, all users on my box are "trusted users" ... I know who they are, and those I don't know don't get shell-acces! ;-) )

I do thank you "Mr. FreeBSD" for your help!

bugger.

Reply With Quote
  #6  
Old February 5th, 2001, 05:53 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
>>I changed that to drwxr-xr-x (might be a bit more
>>"insecure", however, all users on my box are "trusted users"

755 is the default setting for FreeBSD at the very least. How insecure that might be?

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Apache: Doc-root of Virtual hosts in


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


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





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