I googling many many info about this, but none of the proposed solutions did not help me.
What i have:
- clean
rhel7
system - clean
apache 2.4
- web dir:
/var/www/domain.com/public_html
- symlink:
/var/www/domain.com/publik_html/src
=>/home/user/src
- in
/home/user/src
i haveindex.html
with some text
My apache VH configuration (/etc/httpd/sites-available/domain.com.conf
):
<VirtualHost *:80>
ServerName www.domain.com
ServerAlias domain.com
DocumentRoot /var/www/domain.com/public_html
<Directory /var/www/domain.com/public_html>
Options Indexes FollowSymLinks
Require all granted
AllowOverride All
</Directory>
</VirtualHost>
Some interested sections in apache main config:
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory>
#
# 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/html"
#
# Relax access to content within /var/www.
#
<Directory "/var/www">
Options Indexes FollowSymLinks
AllowOverride None
# Allow open access:
Require all granted
</Directory>
# Further relax access to the default document root:
<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.4/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.
#
Require all granted
</Directory>
Problem: when i try access to domain.com/src/index.html
i get Forbidden.
What i try:
chmod o+x /home /home/user /home/user/src /home/user/src/index.html
chown -R apache:apache /var/www/
chown -R apache:apache /home/user/src/
- gaming with
FollowSymLinks
andSymLinksIfOwnerMatch
- gaming with
chmod
What else can I try? Thanks...
UPD#1: SElinux disabled
LogLevel debug
and then check error log