hi
after some examination of this problem, too long :-), it seems that access to
public_html is effected by the permissions on the /home/username directory
(?) and that changing permissions for to:-
drwx--x--x 60 mherbert mherbert 8192 Mar 28 05:46 /home/mherbert
and for:-
drwxr-xr-x 2 mherbert mherbert 4096 Mar 28 06:09 public_html
for the public_html directory.
The httpd.conf file will have a UserDir entry like:-
#
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
UserDir public_html
this then gives you a URL of something like:-
http://www.hungerstone.co.uk/~mherbert/
however remember you need a file like index.html in place, as Apache will not
allow directory browsing by default, see the DirectoryIndex directive in
httpd.conf
#
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
DirectoryIndex index.html index.htm index.shtml index.php index.php4
index.php3 index.cgi
However, i'm not happy with the permissions, not with the fact of having a ~
in the URL (always a pain!). So alternatively you can use a VirtualHost,
something like:-
#
<VirtualHost people.hungerstone.co.uk>
ServerAdmin webmaster@hungerstone.co.uk
DocumentRoot /home/www/people
ServerName people.hungerstone.co.uk
ErrorLog logs/error-people.log
CustomLog logs/access-people.log common
</VirtualHost>
(you need to check the NameVirtualHost directive, to your IP number for your
web server)
You can then put your user html files into the directory below
/home/www/people, ie /home/www/people/mherbert giving you a URL
http://people.hungerstone.co.uk/mherbert/
Use a symbolic link from the users directory...
ln -s /home/www/people/mherbert /home/mherbert/public_html
nicer.....:-). This is based on Red Hat 7.0, with everything in httpd.conf
for the apache settings. Seems apachectl has gone, so did my restarts using
/etc/init.d/httpd
Hi all,
Can anyone offer some hints as to how to make public_html folders available for access by apache?
I'm trying to set up a server in which users can create html files within a folder (eg: /alanh/public_html) which can be made available on the school intranet.
I've checked the folder permissions and they seen ok, httpd.conf seems ok but I get the following errors when trying to access the test html file via lynx :-
lynx 192.168.1.10/~alanh
!Alert: http/1.1 403 Forbidden!
I'd like to get this working - any hints / help / etc?
I've tried this under Suse 7 and Red Hat 6.1 with the same result so it seems like i'm making a fundamental and possibly obvious error here....
Alan
----------------------------------------------------- Alan Harris Network Manager Bryngwyn School
Tel : 01554 750661 Fax : 01554 758255 E-mail: alanh@bryngwyn.carmarthen.sch
-----------------------------------------------------
Notes:
1. The contents of this email may be snooped on by interested government parties for unknown purposes! Regulation of Investigatory Powers Act, 2000.
2. The opinions expressed in this email are personal and may not be shared by Bryngwyn School.
-----------------------------------------------------
-- ------------------------------------ Malcolm Herbert Red Hat Europe t:+44 1483 734955 m:+44 7720 079845 ------------------------------------