LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 11-29-2003, 11:55 PM   #1
Peanut
LQ Newbie
 
Registered: Jun 2003
Location: The Loo
Distribution: RH 9
Posts: 12

Rep: Reputation: 0
Apache - problem linking to other directories


Ok i want a link to go to the directory /files/games/name.of.file
and the index page is located /var/www/html/index.html

i think the index.html code will look like this
Code:
<A HREF="/files/games/name.of.file">Name</A>
As far as i can tell that to achieve this i need to setup an alias in the httpd.conf file.

what i have (and not working) is this
Code:
Alias /files/ "/files/"
<Directory "/files/">
  Options Indexes MultiViews
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>
That code was just modeled from the icons alias already in the httpd.conf file

any and all help is appreciated
Thanks
 
Old 11-30-2003, 12:19 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
When Apache starts, is it chrooted? If for instance Apache is chroot'd to /var, then you won't be able to see any files outside /var.
 
Old 11-30-2003, 01:07 AM   #3
Peanut
LQ Newbie
 
Registered: Jun 2003
Location: The Loo
Distribution: RH 9
Posts: 12

Original Poster
Rep: Reputation: 0
very good question.. i have no idea.


would that chroot pertain to the /usr/sbin/httpd or the httpd.conf file?

and what should i chroot it to?
 
Old 11-30-2003, 11:48 AM   #4
heretic^
LQ Newbie
 
Registered: Jun 2003
Distribution: OpenBSD 3.5, Slackware 10.0, Slackware 9.1
Posts: 3

Rep: Reputation: 0
I know for a fact that Apache can follow links. So instead of trying /files/games/name.of.file, go into the comand line and try
ln -s /files/games /var/www/html/games
that ways you can access your files like this
<A HREF="games/name.of.file">Name</A>
 
Old 11-30-2003, 12:50 PM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Maybe it does work. Do you have an index.html file there?
 
Old 11-30-2003, 12:56 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Make sure you add "FollowSymLinks" as an option for your DocumentRoot
 
  


Reply



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
linking directories david@aber Linux - Newbie 3 11-25-2004 07:45 AM
Linking Directories utahcon Linux - General 1 08-11-2004 06:54 PM
Symbolic linking directories leecming Linux - General 1 06-08-2004 11:11 AM
problems linking programs directories in my path jimdaworm Linux - Newbie 9 04-14-2004 03:27 PM
symbolic linking directories? Possible? ajspliffs Linux - General 3 01-12-2004 11:55 AM

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

All times are GMT -5. The time now is 08:02 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
Open Source Consulting | Domain Registration