squirrelmail probs with http://www.example.com/webmail

Discussion in 'Installation/Configuration' started by vwpete, May 20, 2011.

  1. vwpete

    vwpete New Member

    I have squirrelmail working just fine as hostname with url http://serverlots.example.com/webmail

    But I would like it to work with http://www.example.com/webmail
    So i followed the destructions at http://www.howtoforge.com/enabling-s...r-debian-lenny

    But when I goto http://www.example.com/webmail my browser wants to download a file which when downloaded has this contents

    * index.php
    * Redirects to the login page.
    * @copyright 1999-2010 The SquirrelMail Project Team
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    * @version $Id: index.php 13893 2010-01-25 02:47:41Z pdontthink $
    * @package squirrelmail

    // Are we configured yet?
    if( ! file_exists ( 'config/config.php' ) ) {
    echo '<html><body><p><strong>ERROR:</strong> Config file ' .
    '&quot;<tt>config/config.php</tt>&quot; not found. You need to ' .
    'configure SquirrelMail before you can use it.</p></body></html>';

    // If we are, go ahead to the login page.
    header('Location: src/login.php');


    For fun I typed in the full url to the login page

    and my browser just prompted me to download logon.php

    Its like I have a mime type error and .php has become an unknown file type so its downloaded

    anyways any clues


  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which Linux distribution and version do you use?
    Do you have mod_php installed?
    Is PHP enabled in all websites?
  3. vwpete

    vwpete New Member

    Hi yes mod_php is installed and running when accessing the server by hostname http://server1.example.com

    However I am using the default fast-cgi for the websites.
    When I use fast-cgi the SquirrelMail does not work with http://www.example.com/webmail

    But it does work if I change it to mod_php
    I am using Ubuntu 10.4LTS and followed the build info at

    so do I need to run all my sites as mod_php to make SquirrelMail work as
    http://www.example.com/webmail ?

  4. baralak

    baralak New Member

    I have the exact same problem...

    System Debian 6 with Bind and courier.

    It downloads the same file as well.
  5. baralak

    baralak New Member

    Does anyone have any help on this topic?
  6. vwpete

    vwpete New Member

    well as i said, did you try making the website mod_php instead of fast-cgi, cos that worked for me, i also had to add the "/var/lib/squirrelmail/data/" and "/var/spool/squirrelmail/attach/" folders to PHP open_basedir. Then it all works fine.

    Mind You once you have had to do all this, ya might as well just just add the complete SquirrelMail package to a webmail folder of each domain.

    If anyone has a better idea, would be glad ta know it.
  7. erosbk

    erosbk New Member

    In /etc/apache2/conf.d create a file named sqmail.conf

    Add the following in the file, save, and restart apache2

    next, try to access www.somehost.com/testmail

    Alias /testmail /usr/share/squirrelmail
    <Directory /usr/share/squirrelmail>
      AddHandler application/x-httpd-php .php .php3 .php4 .php5
      php_admin_value open_basedir none
            AllowOverride None
            Order deny,allow
            Allow from all
    I don't work with squirremail, so, I don't know what is the correct path for squirrelmail... if this work, ok, change the alias for the one you like most (if it will be the same that you have right now, just rename the older alias in the older file, or try to add the handler in the current squirrelmail conf file for apache2).

  8. olieb

    olieb New Member

    Worked for me on my perfect server Ubutu 11.04 @ x86_64.


Share This Page