You are not logged in.

#1 2007-09-19 09:52:20

Klas
Member
Registered: 2007-09-18
Posts: 13

Apache UserDir not function

Hallo !

I just installed Arch Linux and I think its a nice distro, espesially to learn Linux from!

I have followed the wiki at http://wiki.archlinux.org/index.php/LAMP
and I cant get Apache UserDir to function. I get an Error 403 when I try to get http://localhost/~klas

What can bee wrong? I haved also read somewere on the net that you should create a special user and group for Apache.
How do I disable shell for Apache then, and do I set its usercatalog to httpd?

Greatfull for yor help.
(excuse my bad english)

Offline

#2 2007-09-19 10:00:43

chaosgeisterchen
Member
From: Kefermarkt, Upper Austria
Registered: 2006-11-20
Posts: 550

Re: Apache UserDir not function

You have made sure that you successfully created the folder public_html in your home folder?


celestary
Intel Core2Duo E6300 @ 1.86 GHz
kernel26
KDEmod current repository

Offline

#3 2007-09-19 10:03:35

Klas
Member
Registered: 2007-09-18
Posts: 13

Re: Apache UserDir not function

Yes, and I changed it to bee executable (chmod a+x ~/public_html) and al files in the folder to (index.html, index.php) Even changed my homefolder by (chmod a+x ~)!

OUTPUT:

[klas@archsrv ~]$ ls -l
totalt 32
drwx------ 2 klas users   112 17 sep 19.53 Desktop
-rwxr--r-- 1 klas users   394 19 sep 08.58 apacheuserdir.txt
-rw-r--r-- 1 root root  17883 18 sep 06.58 httpd.conf
-rw-r--r-- 1 klas users    88 18 sep 05.29 index.php
-rw-r--r-- 1 klas users     0 18 sep 05.29 index.php~
drwxr-xr-x 2 klas users   112 19 sep 09.35 public_html
-rw-r--r-- 1 klas users   290 18 sep 10.01 sambaerror
[klas@archsrv ~]$ cd public_html/
[klas@archsrv public_html]$ ls -l
totalt 8
-rwxr-xr-x 1 klas users 182 19 sep 09.14 index.html
-rwxr-xr-x 1 klas users  88 18 sep 05.29 index.php
[klas@archsrv public_html]$

Last edited by Klas (2007-09-19 10:11:26)

Offline

#4 2007-09-20 11:24:00

Klas
Member
Registered: 2007-09-18
Posts: 13

Re: Apache UserDir not function

Any help with this?

Offline

#5 2007-09-20 11:55:01

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Apache UserDir not function

chmod 755 /home/klas


Give what you have. To someone, it may be better than you dare to think.

Offline

#6 2007-09-25 04:12:26

Klas
Member
Registered: 2007-09-18
Posts: 13

Re: Apache UserDir not function

Ok, I understand this know. The webserver is running as the user nobody. Nobady is in Other. So you have to give permission to other to execute in your homefolder (who I think is a bit stupid for the security, and I understand why it is good to make a group for your webserver to run as, know).

So I run
chmod 701 /home/klas

and got OUT for my folder:
drwx-----x

You also need to go to http://SERVERNAME~user/
.. to get yor site; you need the end slash !

Thanks for your help!

Last edited by Klas (2007-09-25 06:00:32)

Offline

Board footer

Powered by FluxBB