Forum Moderators: phranque

Message Too Old, No Replies

how to config apache for ~user

Set up

         

msgsbox

10:02 pm on Aug 15, 2006 (gmt 0)

10+ Year Member



I wanted to setup a web access for a user in red hat. But I don't know how to set up.

Also, can anyone tell me?
1. Do I have to use ~ (ex: [localdomain...] or I can set it as (http://someuser.localdomain) and How?

2. How can I create cgi-bin for someuser?

I did the search form google, and could not find the answer. You help (even a link to the answer) will be highly appreciated.

encyclo

11:30 pm on Aug 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's a good basic guide in the Apache documentation:

[httpd.apache.org...]

and:

[httpd.apache.org...]

Check out the UserDir directive for information on how the configuration handles URLs. For a subdomain structure, you may have to use mod_rewrite, however.

msgsbox

1:36 am on Aug 16, 2006 (gmt 0)

10+ Year Member



Thanks. That is exactly what I want. But after I modify the httpd.conf file as below

UserDir public_html

<Directory /home/*/public_html/cgi-bin/>
Options ExecCGI
SetHandler cgi-script
</Directory>

I still could not open the web [domainname...]
"404 not found"

BTW, I have made public_html where I created index.html

jdMorgan

12:38 pm on Aug 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> I still could not open the web [domainname...] ... "404 not found"

You'll need to create index,html under the username -- at local filepath /~user/public.html/index.html

You might want to re-read the mod_userdir documentation like I just did. :)

Jim

Angelis

12:39 pm on Aug 16, 2006 (gmt 0)

10+ Year Member



Also on some servers you need a trailing slash (/) or it wont work either.

msgsbox

1:16 pm on Aug 16, 2006 (gmt 0)

10+ Year Member



Thanks everyone. Maybe it is too basic. Finally I found it. Just restart Appache to make the configuration working.