|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
>>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? |
|
#3
|
|||
|
|||
|
>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 |
|
#4
|
|||
|
|||
|
>>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. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
>>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? |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Apache: Doc-root of Virtual hosts in |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|