roundcube shown on root url, not just webmail

Discussion in 'Server Operation' started by tfboy, Dec 27, 2013.

  1. tfboy

    tfboy Member

    I now have my server set up with ISPconfig OK, just one thing is bugging me.
    I've followed the perfect server guides and am using roundcube instead of squirrelmail. It's working ok, both on https://webmail.example.com and also https://example.com/webmail however it's also responding on all the master domains too such as https://example.com and https://www.example.com which I'd like to remove because I might add a normal ssl website in the future.
    I've been through my various apache conf files and can't figure out how to remove it.

    Code:
    # Those aliases do not work properly with several hosts on your apache server
    # Uncomment them to use it or adapt them to your configuration
    #    Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
    #    Alias /roundcube /var/lib/roundcube
    Alias  /webmail        /var/lib/roundcube
    
    # Access to tinymce files
    <Directory "/usr/share/tinymce/www/">
          Options Indexes MultiViews FollowSymLinks
          AllowOverride None
          Order allow,deny
          allow from all
    </Directory>
    
    <Directory /var/lib/roundcube/>
      Options +FollowSymLinks
      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 .:/usr/share/php
      </IfModule>
      # This is needed to parse /var/lib/roundcube/.htaccess. See its
      # content before setting AllowOverride to None.
      AllowOverride All
      order allow,deny
      allow from all
    </Directory>
    
    # Protecting basic directories:
    <Directory /var/lib/roundcube/config>
            Options -FollowSymLinks
            AllowOverride None
    </Directory>
    
    <Directory /var/lib/roundcube/temp>
            Options -FollowSymLinks
            AllowOverride None
            Order allow,deny
            Deny from all
    </Directory>
    
    <Directory /var/lib/roundcube/logs>
            Options -FollowSymLinks
            AllowOverride None
            Order allow,deny
            Deny from all
    </Directory>
    
    <VirtualHost *:443>
      DocumentRoot /var/lib/roundcube
      ServerName webmail.example.com
      SSLEngine On
      SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
      SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
    </VirtualHost>
    
    Any ideas?

    edit: I suppose this could be because this is the roundcube file in /etc/apache2/conf.d/ (which is a link to /etc/roundcube/apache2.conf) instead of a vhost file. I'm still learning and getting confused between the files in conf.d and normal vhost files in /etc/apache2/sites-available. Maybe the problem would go away if I were to somehow migrate this into a dedicated vhost file ensuring it only responds to the aliases and paths definded?
     
    Last edited: Dec 27, 2013
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    If there is only one vhost configured for port 443 then this one is always shown.

    You can change this if you enter a "ServerName" (and maybe ServerAlias) for the domain you want to use for webmailing in the roundcube vhost/conf file.
    Then create a second SSL site that is the default vhost for port 443. This one is shown on all other domain names then.
     
  3. tfboy

    tfboy Member

    Super danke Marius :)
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    No problem ;)
    Just a side-note:
    You can see what vhost is the current default (fallback) one by typing
    Code:
    apache2ctl -t -D DUMP_VHOSTS
     
  5. tfboy

    tfboy Member

    Ahh, very useful indeed. I'll make a note of that for future reference.
    Thanks again.
     

Share This Page