LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-17-2003, 04:43 PM   #1
disinformation
Member
 
Registered: Sep 2003
Location: Wakefield, UK
Distribution: Slackware, Debian
Posts: 38

Rep: Reputation: 15
apache and permissions (mod_alias)


Hi im just messing around with Apache for the first time and am struggling with permissions.

i want to give access to a few files inside a directory outside the document root (/var/www), so i have created an alias, for example


Alias /aliens/ /home/matt/aliastest/


When i try to access a file from within that directory i get a 403 forbidden error, i have chmod the file and dir to 777.

By default apache has an alias to /var/www/icons which works fine, so i though i would try to use a folder in /var/www

I tried Alias aliens /var/www/aliastest/

Same result

Can anyone shed any light on this
 
Old 12-17-2003, 05:09 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Add something like this to your httpd.conf file:

Code:
<Directory "/home/matt/aliastest">
    AllowOverride Options FileInfo
</Directory>
I believe that should work, can't remember totally off top of my head though if that's going to do it or not.
 
Old 12-17-2003, 05:53 PM   #3
disinformation
Member
 
Registered: Sep 2003
Location: Wakefield, UK
Distribution: Slackware, Debian
Posts: 38

Original Poster
Rep: Reputation: 15
didnt work, but didnt stop apache restarting either,

can you give any pointer to some reading on this subject - i trawled throught the apache docs but i must have missed it
 
Old 12-18-2003, 12:14 AM   #4
evilRhino
Member
 
Registered: Oct 2002
Distribution: Red Hat 7.3, 8.0
Posts: 33

Rep: Reputation: 15
I had this problem before, you might just try sym linking to the the directory in your htdocs directory.

ln -s /path/to/htdocs /home/matt/aliastest

I think it'll work just as well for what you are trying.
 
Old 12-18-2003, 07:00 AM   #5
disinformation
Member
 
Registered: Sep 2003
Location: Wakefield, UK
Distribution: Slackware, Debian
Posts: 38

Original Poster
Rep: Reputation: 15
trickykid, thanks for pointing me in the right direction I managed to get this working with the following

<Directory /home/matt/aliastest>
Options -Indexes MultiViews
AllowOverride None
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>

Now I Just cant get directory listing working, i want to be able to type in just the alias i.e. www.foo.com/aliastest and list the file content of that directory
 
  


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
Apache permissions RedHatCore Linux - Software 4 08-26-2005 12:35 AM
Apache permissions doing... nothing? wrbob Linux - Software 5 08-22-2005 09:46 AM
Apache permissions haze Linux - Newbie 1 04-15-2005 04:22 PM
apache and permissions dkc_ace Linux - Software 19 01-17-2003 09:38 PM
apache permissions, maybe? roadie Linux - General 4 06-14-2001 10:52 AM


All times are GMT -5. The time now is 04:12 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