Alias directive problems

Discussion in 'Installation/Configuration' started by ignasigarcia, Jan 21, 2011.

  1. ignasigarcia

    ignasigarcia New Member

    Hi there. I'm setting ispconfig3 so my customer can access the control panel and the webmail (roundcube) using an alias such as:

    www.customer.com/panel
    www.customer.com/webmail

    that will contain either an .htaccess file with a 301 redirect or an index.html with an html redirection

    I've setup apache with 2 alias entries for redirection

    Alias /panel /var/www/panel
    Alias /webmail /var/www/webmail

    I've just put inside those folders an index.html with a text to test this. There is no .htaccess yet in any of these 2 folders.

    If I enter the URL http://server.example.com/panel or http://server.example.com/webmail it works and I see the contents of the index.html

    If I enter http://www.customer.com/panel or http://www.customer.com/webmail I always get a 403 error.

    The log says: client denied by server configuration: /var/www/panel


    Can anybody please help me?

    TIA

    Ignacio
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If you wnat to host any additional software in /var/www which does not belong to ispconfig, you will have to add permissions to access these directories manually in the apache configuration like:

    <Directory /var/www/panel>
    Order allow,deny
    Allow from all
    </Directory>
     
  3. ignasigarcia

    ignasigarcia New Member

    sorry, the fist part I already figured. I had to edit /etc/apache2/sites-enabled/000-ispconfig.conf

    Now I tried to include an .htaccess with a 301 redirection and it is completely ignored.

    Any help?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you have to configure the override options for that directory too. By default, overriding is not allowed for security reasons.

    Please be very carefull of what you allow in these directory and never allow full access to everything in /var/www or your server might get hacked!
     
  5. ignasigarcia

    ignasigarcia New Member

    Thanks. That worked!!!!
     

Share This Page