I can only access Roundcube on port 8080

Discussion in 'General' started by todx, Apr 30, 2012.

  1. todx

    todx Member

    Is it possible to configure virtual hosts so I will be able to access roundcube webmail on https://mydomain.com/webmail?

    I followed the following tutorials:
    http://www.howtoforge.com/perfect-server-debian-squeeze-with-bind-and-courier-ispconfig-3
    http://www.howtoforge.com/changing-from-squirrelmail-to-roundcube-on-your-ispconfig3-server

    Roundcube vhost under conf.d inside apache2 directory:
    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://mydomain.com/webmail/  [L]
        </Location>
      </IfModule>
    </IfModule>
     
    Last edited: Apr 30, 2012
  2. falko

    falko Super Moderator Howtoforge Staff

    <vhost>/webmail should work. Please make sure that /var/www/webmail is part of open_basedir for the vhosts where you want to use RoundCube.
     
  3. todx

    todx Member

    Because of this rule:

    Code:
    RewriteEngine on
    RewriteCond %{HTTPS} !^on$ [NC]
    RewriteRule . https://mydomain.com/webmail/  [L]
    which is fine and everything, I get redirected to https://mydomain.com/webmail/ every time and anywhere I put /webmail at the end (this part is great). But once I get redirected I get an error:

    Code:
    ERROR 500 - Internal Server Error!
    ...with ISPConfig3 template. Is there some problem with .htaccess or something like that?

    Again...accessing the webmail via: https://mydomain.com:8080/webmail works fine.

    EDIT: *** I have also added /var/www/webmail to my open_basedir under mydomain.com.
     
    Last edited: May 1, 2012
  4. Horfic

    Horfic Member

  5. MicroNL

    MicroNL New Member

    Add this below "allow from all" to the roundcube.conf and you should be good:

    Code:
    DirectoryIndex index.php
    
    	<IfModule mod_php5.c>
    		AddType application/x-httpd-php .php
    
    		php_flag magic_quotes_gpc Off
    		php_flag track_vars On
    		php_flag register_globals Off
    		php_value include_path .
    	</IfModule>
    </Directory>
    Had the same issue for a while and this is what fixed it. Hope it does the same for you.
     
  6. todx

    todx Member

    Worked perfectly! Thanks!
     

Share This Page