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 <?php /** * 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 ' . '"<tt>config/config.php</tt>" not found. You need to ' . 'configure SquirrelMail before you can use it.</p></body></html>'; exit; } // 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 http://www.example.com/webmail/src/login.php 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 cheers Pete
Which Linux distribution and version do you use? Do you have mod_php installed? Is PHP enabled in all websites?
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 http://www.howtoforge.com/perfect-server-ubuntu-10.04-lucid-lynx-ispconfig-3-p3 so do I need to run all my sites as mod_php to make SquirrelMail work as http://www.example.com/webmail ? cheers Pete
I have the exact same problem... System Debian 6 with Bind and courier. It downloads the same file as well.
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. cheers pete
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 Code: 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 </Directory> 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). Regards