HELP with symlink to webmail

Discussion in 'General' started by jbryner, Jun 29, 2009.

  1. jbryner

    jbryner New Member

    This might be a completely backwards way of going about it, but I was trying to get set up so that the users could get to webmail by going to www.theirdomain.com/webmail

    So, I created a link in the users web directory that points to /var/www/webmail/

    Now here's the catch I run into.

    I have 5 domains set up, and some work with www.domain1.com/webmail

    there are 2 domains that won't load the login for squirrel mail, they return a 403, forbidden error page.

    This seems really odd to me, and I haven't been able to track it down, as the domains are set up identically except for name, and it wouldn't seem that the permissions would foul up one, and not the other.

    Any help would be greatly appreciated, as the domains that wont load the webmail sections are for my "high maintenance" clients. It figures I suppose.

    I really want to be off the windows server I have been running up til now, and a solution for this one will allow me to get away from Bill and hte gang..

    Thanks guys.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can use symlinks only on webspaces were you use either mod_php or php-cgi / fcgi without suexec. Otherwise you will get a permission error as the security settings in suphp and suexec prevent the execution of code that is outside of a website.
     
  3. jbryner

    jbryner New Member

    Thanks Till

    Makes sense, and after testing works like a charm. I did come up with another solution in searching, and it is found in this thread

    http://www.howtoforge.com/forums/showthread.php?t=34571

    Near the end of the first page of the thread, fastgrav explains that adding the following

    Hi,

    add the following lines in /etc/apache2/conf.d/apache2-doc

    Alias /webmail /usr/share/squirrelmail/

    <Directory "/usr/share/squirrelmail/">
    Options Indexes FollowSymlinks
    AllowOverride None
    Order allow,deny
    Allow from all
    AddDefaultCharset off
    </Directory>

    and every virtual domain will have a www.virt-domain.com/webmail

    and it works great without relying on having to worry too much about the settings per domain.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    But this has the same limitations then the other solution. It wont work with suphp and it wornt work with suexec as it relys on the settings of the domain were you call it trough.
     
  5. voidzero

    voidzero New Member

    My solution is this:

    • The maildomain (MX) is mail.somehost.com
    • When this domain is opened you normally get /var/www/index.html saying 'It Works!'
    • So I added this .htaccess file and set the default config to AllowOverride All (since it's only editable by root anyway):
    Code:
    RewriteEngine On
    RewriteBase /
    Options +FollowSymlinks
    RewriteCond %{HTTP_HOST} ^mail\. [NC]
    RewriteRule .* http://my-main-ispconfig-url/webmail/src/login.php [R=301,L]
    
    Redirect /mail http://my-main-ispconfig-url/webmail/src/login.php
    
    Now people can open the URL at http://mail.somehost.com and also, unconfigured but working domains can be opened at http://somehost.com/mail

    Hope this helps! :cool:
     

Share This Page