You are not logged in.

#1 2004-07-23 15:08:54

From: New Jersey
Registered: 2004-02-15
Posts: 711

httpd: forbiddon?

I want to have a folder in my home directory on my website.  I tried symlinking with a symlink in the root of my httpd and I set the folder to a+rx...  When I access the folder on the website, I get a forbidden message...  What's wrong?

If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing.   1 Corinthians 13:2


#2 2004-07-23 20:55:47

Lazy Developer
From: London, UK
Registered: 2004-07-06
Posts: 1,204

Re: httpd: forbiddon?

There is a feature in apache which allows people to access a given user's stuff via http://your_website/~username/ . You can get this to work by making a folder in your home directory called "public_html" . Make sure your home directory is exectuable by all, so "chmod 0771 ~" would be fine. Then also make sure that your ~/public_html directory is readable and executable by "chmod 0775 ~/public_html" would work.

Now enabling it in the apache config file. Make sure the following lines/sections exist and are not commented out:

LoadModule userdir_module lib/apache/

This one is to enable the apache module for this.

<Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options All Includes ExecCGI
        Order allow,deny
        Allow from all
        Order deny,allow
        Deny from all

And this is a directory entry to make all the user's directories accessible with whatever options you want to put in there (see apache manual). 

Now just (re)start apache to get the new config loaded, throw whatever you want to in ~/public_html, then visit  ,  to test it out.

Best of luck and I hope this helps.

The suggestion box only accepts patches.


#3 2004-07-24 03:03:52

Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797

Re: httpd: forbiddon?

On an arch system 771 isn't exactly the best idea.  Everyone shares the same group, so anyone would be able to write to your home dir.  Try 711.  Same thing with ~/public_html, 755.

I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal


Board footer

Powered by FluxBB