LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-16-2004, 04:43 AM   #1
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Rep: Reputation: 30
UserDir not working in apache2


Hey

I'm trying to set up the UserDirs in apache2, but I'm having real problems. I can access http://172.24.15.229/~hamish/asdf.html, but I can't acces http://172.24.15.229/~hamish/

This seems to be a common problem. I have ensure that all directories leading to /home/hamish/public_html are 711, to allow access to everyone. Furthermore, public_html is 755, to allow everyone to read it.

I have posted my apache2 and commonapache2 conf files:
http://www.icue.co.uk/apache2.txt
http://www.icue.co.uk/commonapache2.txt

I was told that the problem was to do with the <directory></directory> bit, and I tried the suggestions that I was given.

I have been careful to restart apache2 each time I make changes.

The problem is really bugging me! Can someone please shed some light on it?

Thanks
Hamish
 
Old 06-16-2004, 05:33 AM   #2
vbraca
LQ Newbie
 
Registered: Aug 2003
Location: Serbia
Distribution: SuSE
Posts: 29

Rep: Reputation: 15
Had the same problem on my SuSE Linux box - solution is simple - just place index.html file in your /home/user/public_html folder and everything will start working ...

Bratislav Velickovic
www.velickovic.net
 
Old 06-16-2004, 10:57 AM   #3
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Original Poster
Rep: Reputation: 30
Hey
That works fine for a website, I'm just looking to show all the files. At least this proves that the permissions for a website would be fine.

Have you got any suggestions how I could just list all the files in the directory?

Hamish
 
Old 06-16-2004, 11:32 AM   #4
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Original Poster
Rep: Reputation: 30
I think it has something to do with indexes. All index stuff seems fine though. these are the relevant bits from /etc/apache2/conf/commonapache2.conf

### Directives controlling the display of server-generated directory listings.
###
<IfModule mod_autoindex.c>
#
# FancyIndexing is whether you want fancy directory indexing or standard
#
IndexOptions FancyIndexing VersionSort NameWidth=*

#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions. These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.png) x-compress x-gzip

AddIconByType (TXT,/icons/text.png) text/*
AddIconByType (IMG,/icons/image2.png) image/*
AddIconByType (SND,/icons/sound2.png) audio/*
AddIconByType (VID,/icons/movie.png) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip .bz2
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py .php .php3
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif

#
# AddDescription allows you to place a short description after a file in
# server-generated indexes. These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz

#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
#
# If MultiViews are amongst the Options in effect, the server will
# first look for name.html and include it if found. If name.html
# doesn't exist, the server will then look for name.txt and include
# it as plaintext if found.
#
ReadmeName README.html
HeaderName HEADER.html

#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing. Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* RCS CVS *,v *,t

</IfModule>
# End of indexing directives.


Hope this help someone to help me. I have ensured that the autoindex module is listed in the /etc/apache2/conf/apache2.conf

Hamish
 
Old 06-29-2004, 11:43 AM   #5
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Original Poster
Rep: Reputation: 30
Fixed!

Don't use the Gentoo edition of Apache because they have split the httpd.conf file into two bits. This makes it confusing and means that one can very easily get confused/miss something out.

Just download and install Apache2 following these instructions:
http://httpd.apache.org/docs-2.0/install.html

Hope this helps a Gentooer in the future.

Hamish
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
openSUSE 10 RC1 - Apache2 userdir forbidden Smartcat99S SUSE / openSUSE 9 02-11-2006 10:12 PM
HTTPS not working under Apache2 and OpenSSL pennywind Linux - Security 7 12-29-2005 01:45 PM
cant get perl working with apache2 Garda Linux - Networking 1 09-28-2005 10:27 PM
PHP4 not working with Apache2 in Mandrake 10.1 eikeland Linux - Software 2 01-17-2005 07:06 PM
apache2 UserDir: where do I start? Brother Michael Debian 2 01-07-2005 10:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration