LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-30-2011, 02:05 PM   #1
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Rep: Reputation: 47
Apache and Squirrelmail


I hope there are some Apache/Squirrelmail gurus here.

I have apache 1.3, and squirrelmail installed on CentOs (virtual server online hosting). Squirrelmail is located in /opt/hosting/interface/3rdparty/squirrelmail. In the squirrelmail directory there is a index.php that points to ./src/login.php To get to my webmail I have to go to: https://ip-address:20082/3rdparty/sq.../src/login.php.

I want to be able to type http://ipaddress/webmail to get to my squirrelmail login, so I tried putting this in /etc/httpd/conf/httpd.conf:

Code:
Alias /webmail /opt/hosting/interface/3rdparty/squirrelmail
Now, when I go to http://ipaddress/webmail, my browser forwards me to http://ipaddress/webmail/src/login.php, but it is a blank page, instead of the login that I normally get. How can I configure Apache so that I can type http://ipaddress/webmail to get to squirrelmail.
 
Old 06-30-2011, 02:42 PM   #2
rustek
Member
 
Registered: Jan 2010
Location: Melbourne, IA, USA
Distribution: Ubuntu
Posts: 93

Rep: Reputation: 8
Hi

In /etc/squirrellmail/apache.conf
Change the first line to:
Alias /webmail /usr/share/squirrelmail

Why are you using such an old version of apache?

Russ
 
Old 06-30-2011, 03:16 PM   #3
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Original Poster
Rep: Reputation: 47
I have no /etc/squirrelmail directory at all. I tried searching for it:
Code:
[root@server /]# find / -name 'apache.conf' 2>/dev/null
[root@server /]# find / -name 'squirrelmail' 2>/dev/null
/opt/hosting/interface/3rdparty/squirrelmail
[root@server /]#
As you can see, I couldn't find anything named apache.conf. And the only squirrelmail it could find is "/opt/hosting/interface/3rdparty/squirrelmail". There is no apache.conf file in that directory. I am guessing this is a non standard install or something. Should I create /etc/squirrelmail/apache.conf? The only reason I am using an old copy of Apache is because I have had the account with my hosting provider for a while.
 
Old 06-30-2011, 04:19 PM   #4
rustek
Member
 
Registered: Jan 2010
Location: Melbourne, IA, USA
Distribution: Ubuntu
Posts: 93

Rep: Reputation: 8
Hi

In a standard ubuntu install the file apache.conf is included into httpd.conf so you did the right thing the first time.

Try
Alias /webmail /3rdparty/squirrelmail

I know it doesn't make much sense, but it's the best I can guess from the address you say works.

Last edited by rustek; 06-30-2011 at 04:26 PM.
 
Old 07-01-2011, 08:34 AM   #5
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Original Poster
Rep: Reputation: 47
That didn't work, "404 Not Found". I think the "Alias /webmail /opt/hosting/interface/3rdparty/squirrelmail" was a little closer, since it found squirrelmail, but it was just a blank page instead of the normal login screen, even though it forwarded to login.php. I can't find anything online, any other suggestions?
 
Old 07-01-2011, 02:03 PM   #6
rustek
Member
 
Registered: Jan 2010
Location: Melbourne, IA, USA
Distribution: Ubuntu
Posts: 93

Rep: Reputation: 8
Ok
https://ip-address:20082/3rdparty/sq.../src/login.php
Works

I notice now that you want
http://ip-address/webmail
To work.

If your apache has mod-rewrite then you can rewrite the address and make this work.

I assume you have :80 and :20082 virtual hosts in your httpd.conf


In the :80 virtual host
Code:
<IfModule mod_rewrite.c>
  <IfModule mod_ssl.c>
    <Location /webmail>
      RewriteEngine on
      RewriteCond %{HTTP_HOST}  ^ip-address
      RewriteRule ^(.*) https://ip-address:20082/3rdparty/sq.../src/login.php [NC,R=301,L]
    </Location>
  </IfModule>
</IfModule>
Of course this will only work if mod-rewrite is installed.
 
Old 07-02-2011, 10:17 AM   #7
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Original Poster
Rep: Reputation: 47
I believe mod_rewrite is installed. I tried this, and still no cigar. I have this line, so I believe that mod_rewrite is installed:

Code:
LoadModule rewrite_module modules/mod_rewrite.so
There is no :20082 in the httpd.conf. So I don't even know how it is working. This came as part of my virtual server install. Could there be another web server of some kind installed that is taking care of the :20082 port?

Last edited by CincinnatiKid; 07-02-2011 at 10:19 AM.
 
Old 07-02-2011, 07:05 PM   #8
rustek
Member
 
Registered: Jan 2010
Location: Melbourne, IA, USA
Distribution: Ubuntu
Posts: 93

Rep: Reputation: 8
It would be nice if someone familiar with this particular setup would chirp in with a quick answer, but I guess it's just you and me for the moment. Many would just rag on the old versions.

cd to the directory that contains your httpd.conf and
grep -R 20082 *

If you want you can search the entire filesystem with
grep -R 20082 /*
But you probably don't have to back up that far. (it will be messy anyway)

There has to be a Listen line somewhere.
grep -iR Listen *

They use Include lines a lot, I include dozens of conf files in my setup.

Your httpd.conf may be the first file read, or it may be included in some other file that the server reads first.

Also your httpd.conf may include other conf files into it.

grep -iR Include *

I think here the trick is to figure out how it works, then fix it.

Let me know what you discover and I'll try to help you figure out where to put the rewrite lines.

Remember your really looking for the :80 http setup not the https port 20082 setup.

Russ

Last edited by rustek; 07-02-2011 at 07:07 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
restricting to squirrelmail to https + apache haariseshu Linux - Server 1 12-07-2009 07:24 AM
Squirrelmail + PHP + Apache failures climbingmerlin Linux - Software 4 01-13-2006 05:20 PM
Squirrelmail/Apache Mailheader overlord73 Linux - Software 1 10-08-2004 01:56 PM
Apache & Squirrelmail:Redirect to https? mac_phil Linux - Software 1 05-24-2004 03:52 AM
Apache & Squirrelmail.. cannot remove SqMail? jrbush82 Linux - Software 1 05-02-2004 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration