Angelo
07-08-2004, 08:06 AM
I do not want the two times login checking Cpanel webmail system so installed the Squirrelmail seperatly to another directory. When i try to access it through the main domain it is ok. But i want to all the users access them through their domain.com/mail or something like that. I added a ScriptAlias to the apache but that seem to give the "premature head of script error". If i try adding only Alias, it redirects but searches the upcoming pages after login in the entered domain not where the sq is installed. Anyone who is using squirrelmail and have got a solution for this?
ps: i have checked the permission setup on the files.
arielhosting
07-08-2004, 08:31 AM
Hi,
You cannot use /mail since that is reserved - use something like /sqmail or /email maybe.
You need to modify the httpd config file to point to your global squirrelmail install
hth.
Angelo
07-08-2004, 08:40 AM
From httpd.conf
---
ScriptAlias /sq /usr/local/sq/index.php
---
From error log:
[Thu Jul 8 08:40:07 2004] [error] [client 195.175.37.22] Premature end of script headers: /usr/local/sq/index.php
[Thu Jul 8 08:40:07 2004] [error] [client 195.175.37.22] File does not exist: /home/proturk/public_html/500.shtml
arielhosting
07-08-2004, 09:01 AM
ScriptAlias is for cgi programs, not php.
You just want to use Alias instead.
Angelo
07-08-2004, 09:17 AM
Yes but as in my first post when i use Alias;
suppose i try mydomain.net/sq ok it opens the first login box and than after trying login it does not search for /usr/local/sq/src/redirect.php instead it looks for mydomain.net/src/redirect.php and gives 404.
What about domain.com/webmail or is that what you are talking about with the double login?
Rus
Angelo
07-08-2004, 10:00 AM
Yes exactly. Webmail is working but its alias is through cpanel cgi's so you must login two times and i also want no-cpanel webmail so i tried this way.
arielhosting
07-08-2004, 10:26 AM
Originally posted by fcarsenal
Yes but as in my first post when i use Alias;
suppose i try mydomain.net/sq ok it opens the first login box and than after trying login it does not search for /usr/local/sq/src/redirect.php instead it looks for mydomain.net/src/redirect.php and gives 404.
Hmm....it is correct that, from your browser perspective, you see mydomain.net/src/redirect, but underlying it *should* be getting the correct file.
Try this:
RewriteEngine On
RewriteRule ^/sq(.*)$ /sq$1 [L]
or
RewriteEngine On
RewriteRule ^/sq(.*)$ /sq$1 [R]
can't remember which....
Angelo
07-08-2004, 03:05 PM
Thanks but that did not work neither.. any more suggestions?
arielhosting
07-08-2004, 04:24 PM
hmmm...not really.
I just checked one of my servers with a global SM install and it just had this in the httpd.conf:
Alias /sqmail /usr/share/sqmail
Are you restarting apache between changes and clearing your browse cache?
If you do a tail -f /etc/httpd/logs/error_log then attempt to connect to the global squirrelmail, you should see an entry in there (if you are getting an error) and it may give you more of a clue.
If you see nothing in there then chances are you are viewing a cached copy of the page -eg from your browser or a transparent proxy somewhere along the way.
The other thing is, are you sure the squirrelmail install actually works?
What happens if you copy it to a normal domain and try to access it from there - does it work?