LinuxQuestions.org
Help answer threads with 0 replies.
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 03-24-2011, 04:17 AM   #1
ghpradeep
Member
 
Registered: Mar 2011
Posts: 32

Rep: Reputation: 0
Regarding squirrel mail web page redirection.


HI,

I have configured qmail on rhel5 server with squirrel webclient. I am currently access squirrel mail using http://servername.domainname.com/webmail/src/login.php. I want to redirect this page to http://webmail.domainname.com


Please help me on this.
 
Old 03-25-2011, 05:04 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Hi,

You need to create a virtual host in your web server, name it webmail.domainname.com and use the path to squirellmail as its docroot.

Regards
 
Old 03-28-2011, 04:37 AM   #3
ghpradeep
Member
 
Registered: Mar 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Hi,
I have created new virtual host as per ur instructions. can i access using http://webmail.mydomain.com/webmail. i want to access directly like when i enter webmail.mydomian.com in explore it should open webclient page.

i want to redirect http://servername.domainname.com/webmail/src/login.php to http://webmail.mydomain.com site.

Last edited by ghpradeep; 03-28-2011 at 04:38 AM.
 
Old 03-28-2011, 04:52 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Hi,

I've told you to use the path to squirrelmail as the DocumentRoot of the vhost. For example is the path to squirrelmail is /var/www/html/squirrelmail and assuming you run apache web server, you need something like:
Code:
<VirtualHost *:80>
ServerName webmail.mydomain.com
DocumentRoot /var/www/html/squirrelmail 
...
</VirtualHost>
Regards
 
Old 03-28-2011, 05:42 AM   #5
ghpradeep
Member
 
Registered: Mar 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Hi,

My domain name is rtscmail.in. I have configured httpd.conf as per below:

<VirtualHost *:80 >
ServerName webmail.rtscmail.in
ServerAdmin postmaster@rtscmail.in
DocumentRoot /var/www/html/webmail
</VirtualHost>

when i tried to access webclient using http://webmail.rtscmail.in it shows me default http testpage. but when i tried to access using http://webmail.rtscmail.in/webmail. its work.

i dont want to type /webmail at end of the address to access web base client.

Hope u understand my problem.

Thanks in Advance...
 
Old 03-28-2011, 06:18 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
I've understood your problem, but you don't give much details.
How did you install squirrelmail? If you used your package manager, then it's installed in /usr/share/squirrelmail and there should be an Alias /webmail
If that's the case, use /usr/share/squirrelmail as the DocumentRoot of webmail.rtscmail.in and comment out the Alias
Or post here httpd.conf so we can have a better look

Regards
 
Old 03-28-2011, 06:35 AM   #7
ghpradeep
Member
 
Registered: Mar 2011
Posts: 32

Original Poster
Rep: Reputation: 0
I have installed squirrel mail as per instruction mention in qmail site I have configured qmail as a email server. I have configured httpd.conf file as per instruction mention in qmailrocks.org site on page http://qmailrocks.org/webmail_rh_slack.htm.

<VirtualHost 192.168.2.147:80>
ServerName rtsc.rtscmail.in
ServerName webmail.rtscmail.in
ServerAlias mail.*
ServerAdmin postmaster@rtscmail.in
DocumentRoot /var/www/html/
</VirtualHost>


<VirtualHost *:80 >
ServerName webmail.rtscmail.in
ServerAdmin postmaster@rtscmail.in
DocumentRoot /var/www/html/webmail
</VirtualHost>
 
Old 03-28-2011, 06:51 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Your configuration is wrong. You need only one (1) vhost named webmail.rtscmail.in, or the first one will take precedence.
Also check the NameVirtualHost directive (e.g. NameVirtualHost 192.168.2.147:80) and make sure it matches the notation used by the VirtualHost tag (e.g. <VirtualHost 192.168.2.147:80>).
So try the following instead:
Code:
<VirtualHost 192.168.2.147:80>
ServerName rtsc.rtscmail.in
ServerAdmin postmaster@rtscmail.in
DocumentRoot /var/www/html/
</VirtualHost>
<VirtualHost 192.168.2.147:80>
ServerName webmail.rtscmail.in
ServerAdmin postmaster@rtscmail.in
DocumentRoot /var/www/html/webmail
</VirtualHost>
 
Old 03-28-2011, 07:02 AM   #9
ghpradeep
Member
 
Registered: Mar 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Hi,

I tried given configuration it only work when i used http://webmail.rtscmail.in/webmail. Its not working for http://webmail.rtscmail.in

when i used http://webmail.rtscmail.in its display test page. but when i used http://webmail.rtscmail.in/webmail then only i get squirrel web mail login screen.
 
Old 03-28-2011, 07:11 AM   #10
ghpradeep
Member
 
Registered: Mar 2011
Posts: 32

Original Poster
Rep: Reputation: 0
HI,

Now its working. I can access site using http://webmail.rtscmail.in.

any idea to to secure it using https://

Thanks for help....
 
Old 03-28-2011, 07:29 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Now its working. I can access site using http://webmail.rtscmail.in.
You forgot to restart apache?

Anyways you need to create an https vhost using mod_ssl. You can take a look here for detailis
When you are sure that it's working and you can access https://webmail.rtscmail.in, you can create a .htaccess in /var/www/html/webmail containing:
Code:
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
to force users use https

Regards
 
Old 03-29-2011, 07:18 AM   #12
ghpradeep
Member
 
Registered: Mar 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Hi,

I am getting below error.
Not Found

The requested URL / was not found on this server.

after adding Rewrite engine in htaccess file. any thing need to change the port 80 to 443 in httpd.conf file.
 
Old 03-29-2011, 07:35 AM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Why don't you post your ssl configuration?
From the error, I can only guess that you have to create an ssl vhost (webmail.rtscmail.in) that uses the same docroot and other settings as the non-ssl one.
 
Old 03-29-2011, 07:52 AM   #14
ghpradeep
Member
 
Registered: Mar 2011
Posts: 32

Original Poster
Rep: Reputation: 0
can u pleas post me ssl.configuration i have not configure ssl on my server. Hope u have all details:

docroot /var/www/html/webmail
server name webmail.rtscmail.in
 
Old 03-29-2011, 08:17 AM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
I gave you a link to help you setup apache with ssl. Everything you need is written there.
Follow it and post here any errors you may get along with your configuration.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
executing linux commands from web page and outputing it back to the web page ashes_sheldon Programming 9 02-28-2015 01:07 AM
web page redirection birla.sunil Linux - Server 6 10-15-2010 05:36 AM
LXer: Debian Mail Server Setup with Postfix + Dovecot + SASL + Squirrel Mail LXer Syndicated Linux News 0 03-12-2008 11:50 PM
Squirrel Mail is not sending mail in INBOX MajazKhan Linux - Server 1 04-08-2007 07:57 AM
Squirrel Mail LeniuNYC Linux - Software 11 03-07-2004 01:47 PM

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

All times are GMT -5. The time now is 03:30 PM.

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