HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   How to redirect on right way? - ISPConfig3 (http://www.howtoforge.com/forums/showthread.php?t=59637)

pallermo 19th November 2012 14:04

How to redirect on right way? - ISPConfig3
 
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.

pallermo 19th November 2012 15:18

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 :(

till 19th November 2012 15:43

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.

pallermo 19th November 2012 16:45

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


All times are GMT +2. The time now is 20:02.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.