Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi, I'm trying to set up some virtual hosts. I want my actual data to be inside the home dir of the user. From what I've been trying, I always get 403s. When I move the data outside the home, let's say /www/site it works. Here's what I think might work but won't:
Make /www/sitename/ a symlink to /home/user/sitename
Then set the Virtual Host to /www/sitename
That way the data lives at /home/user/sitename
This did not actually work. Any other ideas on how to get this to work where the data is inside of the home dirs? I absolutely need the data in the home dirs, as the RAID was made so the /home has a ton of space.
I also tried to make /home/user/site be owned by apache and the in group apache. That also didn't work. I even went as far as adding the user to the apache group; didn't work.
Any help is appreciated. I'm really willing to do anything as long as the actual data lives inside of the home dir of the user. I'm willing to change permissions and groups/owners of various dirs if necessary.
Distribution: Fedora Core 4, Fedora Core 5, Redhat 9.0, Solaris 10, WInXP pro, W2k pro
Posts: 30
Rep:
Hi,
hope that you have solved this problem but as I mentioned in some other post
check permissions from "lower" level. What I mean is that permissions should be correct
from the beginning of path. If you have permission "problem" somewhere between /home and DocumentRoot, you really do not have permission to access that directory. This is not Apache problem but OS is denying your access.
Hi, I'm trying to set up some virtual hosts. I want my actual data to be inside the home dir of the user. From what I've been trying, I always get 403s.
Same problem here with apache 2.2.4 under FC6. What makes this particularly frustrating is that I have this working on another machine with apache 2.0.54 under FC4. Prior to any customizations, the httpd.conf on both were nearly identical, and indeed the VirtualHost examples are identical. Here are the changes I made to httpd.conf:
Code:
# ServerAdmin root@localhost
ServerAdmin ted@localhost
. . .
# DocumentRoot "/var/www/html"
DocumentRoot "/home/htdocs"
. . .
# <Directory "/var/www/html">
<Directory "/home/htdocs">
. . .
AddType application/x-httpd-php .php .phtml .html
. . .
<VirtualHost drupal.development:80>
ServerAdmin ted@localhost
DocumentRoot "/home/htdocs/drupal_development"
ServerName drupal.development
ErrorLog logs/drupal_development-error_log
CustomLog logs/drupal_development-access_log common
<Directory "/home/htdocs/drupal_development">
AllowOverride All
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
</Directory>
</VirtualHost>
where drupal_development is a symbolic link to a path in my own home directory tree that contains the actual Drupal installation.
This works like a charm under FC4, but under FC6 it produces 403 Forbidden errors. On both machines, I am a member of the apache group. All relevant directory structures, permissions (775 for directories, 664 for ordinary files), and ownerships (me root for /home/htdocs, me me for everything below /home/htdocs) are the same across machines. Drupal runs fine under FC6 if I get rid of the VirtualHost stuff and just install it into a real directory called /home/htdocs/drupal_development, not a symbolic link to somewhere else.
Comment the Directory container and restart Apache.
An interesting suggestion, and worthy of trying even if I did steal the Directory container from people who seem to know what they're doing--specifically this article
Using open source software to design, develop, and deploy a collaborative Web site, Part 4: Building your development environment in Linux http://www.ibm.com/developerworks/ed...AGX46&S_CMP=LP
But it does nothing under FC6.
Under FC4 http://localhost/ gives me the Drupal-managed site as before.
Quote:
Isn't this explicitly only allowing access to the loopback interface ?
I'll have to test it from a different machine. With the Directory container intact, the implementation under FC4 actually worked--served pages nicely to clients at remote sites. Whether
commenting it out interferes with its performance is something yet to be discovered.
Did you configure SELinux to enable access to home directories from Apache?
Good question. I should have mentioned that SELinux is not enabled on either machine. Long ago I got tired of playing "mother may I" on these development machines, which always sit behind a hardware firewall, and only occasionally have httpd running.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.