LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache & symbolic links (https://www.linuxquestions.org/questions/linux-software-2/apache-and-symbolic-links-42393/)

zeky 01-22-2003 05:45 AM

Apache & symbolic links
 
hi

here is the scenario:

my apache rootdir is /usr/local/apache
now, because i don't have enought free space on my server 2 put up some stuff that i need to share thru the web (no it's not pr0n :p), i mounted my other share (on another box) to /stuff.

I made in Apache rootdir a symbolic link that shows --> /stuff (ln -s /stuff /usr/local/apache/stuff

i want this folder to be browsable thrue web (+Indexes).

My Q is, how should lines in httpd.conf look, to allow me this symlinks? I know i've allready once done that, but i forgot what was the syn tax... :(

here is what error_log has to say, when trying to reach this http:\\195.66.25.130\stuff:

[Wed Jan 22 12:46:26 2003] [error] [client 195.66.25.130] Symbolic link not allowed: /usr/local/apache/Stuff/

--zeky:study:

jkrohn 01-22-2003 06:44 PM

Check the httpd.conf file. There is an option you can set called

FollowSymLinks

eg:
Code:

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/htdocs"

#
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/htdocs">

#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
    Options Indexes FollowSymLinks MultiViews
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
    AllowOverride All

#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all
</Directory>

An example from my httpd.conf set for working symlinks.

mrowlands 02-06-2008 07:12 AM

Hi Thanks For the reply

I changed my httpd.conf to

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

AllowOverride All

in order to let it allow symbolic link, then restarted apache but I am still getting the browser message and that the requested URL counld not be found.

The apache error_log still still shows the error :error <clinet IP address> file does not exist usr/local/apache2/htdocs/usr

just another question does apache set a symbolic link at the install for htdocs??

Thanks
m

uks 06-19-2008 09:23 AM

Hi
You would find an entry like this for your Document root, for ex,

<Directory "/var/www/htdocs">

in the httpd.conf. Allow the same thing there and restart httpd and see what happens

FollowSymLinks
AllowOverride None

--Ukesh Upendran


All times are GMT -5. The time now is 05:40 PM.