Link to home
Start Free TrialLog in
Avatar of brendanwov
brendanwov

asked on

Symlink between multiple domains on PLESK 8.1 (Linux)

Hey Experts!

I'm in a situation where I need to create a symlink from one domain to another in PLESK 8.1.  Althought the symlink is properly created, I keep getting a FORBIDDEN error from Apache when trying to access files which should  be accessible through the symlink.

I'm guessing this is a chown issue where Apache is locked down by PLESK to not allow symlinks between domains.

Does anyone know a simple way around this?  If so, are there serious security implications to your suggested change?

Thanks a lot!

Brendan
Avatar of Arty K
Arty K
Flag of Kazakhstan image

There is an option in httpd.conf to allow following symlinks:
Options FollowSymLinks
Without this option following symlinks is forbidden.
Read here: http://httpd.apache.org/docs/2.0/mod/core.html#options

What is the exact error text? Please provide the error line from apache error_log file.
Avatar of brendanwov
brendanwov

ASKER

Hey Nopius!

Thanks for your quick reply.  Here is how my httpd.conf file is currently configured...

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

Can you give me the exact syntax of what I need to change in order to allow symlinks between domains?

I look forward to your reply.  Thanks!

Brendan
Hey Nopius!

Just to be sure you have all the information you need...

# 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
# features.
#
<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/html">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
    Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride None

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

</Directory>


I look forward to your reply.  Thanks!

Brendan
It looks that you have required option. Now I need to see what Apache says in /var/www/logs/error_log (I belive it's correct path), just try to access symlinked domain then copy-paste the output from:

tail -20 /var/www/logs/error_log

Hey Nopius!

I triggered the error and then viewed the log files and there didn't seem to be any errors listed within the most recent 20 minutes.  So I don't think this error is registering.  To calrify, the log file you suggested I tail didn't exist so I used the command below.

tail -50 /var/log/httpd/error_log

Thanks for your help!  What do you suggest?  Let me know.

Brendan
ASKER CERTIFIED SOLUTION
Avatar of Arty K
Arty K
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial