How to redirect on right way? - ISPConfig3

Discussion in 'General' started by pallermo, Nov 19, 2012.

  1. pallermo

    pallermo New Member

    Hi guys,
    recently I have removed from my server (Debian 6.0 with ISPConfig 3) squirrel mail and install in /var/www/webmail another webmail client (Roundcube).
    Everything works perfectly but when I tried to do redirects for /webmail for all domains on my server I am getting ERROR 403 - Forbidden! I can't open page at all. I made .conf file for redirect in /etc/apache2/conf.d/
    Till now I have used this method for a long time and it was working good, but now with ISPConfig3 it can't work.
    Also tried to change chmod of folder to www-data but it also can't work.
    M I missing something or?
    What could be the problem?

    p.s. For setup of server I was using - Perfect server Debian...bla bla bla :) from howtoforge.
     
  2. pallermo

    pallermo New Member

    It can work only in this case:

    Code:
    # RoundCube alias and redirect functions
    Alias /webmail /var/www/webmail
    <Directory /var/www/webmail>
      Options +FollowSymLinks
      # This is needed to parse /var/www/webmail/.htaccess. See its
      # content before setting AllowOverride to None.
      AllowOverride All
      order allow,deny
      allow from all
    </Directory>
    # Protecting basic directories:
    <Directory /var/www/webmail/config>
            Options -FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/webmail/temp>
            Options -FollowSymLinks
            AllowOverride None
            Order allow,deny
            Deny from all
    </Directory>
    <Directory /var/www/webmail/logs>
            Options -FollowSymLinks
            AllowOverride None
            Order allow,deny
            Deny from all
    </Directory>
    <IfModule mod_rewrite.c>
      <IfModule mod_ssl.c>
        <Location /webmail>
          RewriteEngine on
          RewriteCond %{HTTPS} !^on$ [NC]
          RewriteRule . https://www.domain.com:8080/webmail/  [L]
        </Location>
      </IfModule>
    </IfModule>
    If I remove mode_rewrite I get Error 500.
    Damn :(
     
  3. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    There is nothing special in this configuration regarding ispconfig, the only difference is that you have to explicitly allow access to the directory with:

    <Directory /path/to/your/webmail/install>
    AllowOverride All
    order allow,deny
    allow from all
    </Directory>

    and then add a alias for this directory. Ensure that you add your configuration after the configuration of the other vhosts is loaded by placing your additional config file in /etc/apache/sites-enabled and give it a name like 900-webmail.conf

    were you instalelled your webmail client.
     
  4. pallermo

    pallermo New Member

    And just to figure out how to do all of these...let me check one again what I have to do :)))
     

Share This Page