0

I updated my apache server to 2.4.10 from version 2.2.x on debian7 and I have problem with multi virtual hosts. When I try to load page I have forbidden [403] error. If I enable only one alias the page works fine, when I try to enable another page, then I received 403 error. I add to all configs Require all granted.

What I doing wrong?

code of alias 1:

<VirtualHost example.com:3099>
DocumentRoot /home/ftp/example.com
alias alias1 /home/ftp/example.com/alias1/>
<Directory /home/ftp/example.com/alias1/>
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride None
        Require all granted
</Directory>
</VirtualHost>

code of alias 2:

<VirtualHost example.com:3099>
    DocumentRoot /home/ftp/example.com
    alias alias2 /home/ftp/example.com/alias2/>
    <Directory /home/ftp/example.com/alias2/>
            Options +Indexes +FollowSymLinks +MultiViews
            AllowOverride None
            Require all granted
    </Directory>
    </VirtualHost>

UPDATE 1 In /etc/apache2/apache2.conf I Have

<Directory />
        Options FollowSymLinks
        AllowOverride none
        Require all denied
</Directory>

If I change denied to granted, error 403 disappear, but I have access to all subdirs in /home/ftp/example.com even they haven't virtual host alias.

UPDATE 2 I have error, when I write a post here, In server config I have proper directory location.

kerog
  • 1
  • 1
  • 5

1 Answers1

0

These parameters don't match, so the path is forbidden. Look at the last character:

  alias alias2 /home/ftp/example.com/alias2/>
    <Directory /home/ftp/example.com/alias1/>
covener
  • 17,402
  • 2
  • 31
  • 45
  • I have error only in post here, in server config I have proper path – kerog May 28 '15 at 06:59
  • You still have a ``>`` on the end of the Alias path. Is that really what you have in the Apache configuration file? The first argument of the URL-path for Alias would usually have a leading ``/`` as well. Any reason you don't? – Graham Dumpleton May 28 '15 at 07:13