Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
03-25-2011, 05:04 AM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
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
|
|
|
03-28-2011, 04:52 AM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
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
|
|
|
03-28-2011, 05:42 AM
|
#5
|
Member
Registered: Mar 2011
Posts: 32
Original Poster
Rep:
|
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...
|
|
|
03-28-2011, 06:18 AM
|
#6
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
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
|
|
|
03-28-2011, 06:35 AM
|
#7
|
Member
Registered: Mar 2011
Posts: 32
Original Poster
Rep:
|
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>
|
|
|
03-28-2011, 06:51 AM
|
#8
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
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>
|
|
|
03-28-2011, 07:11 AM
|
#10
|
Member
Registered: Mar 2011
Posts: 32
Original Poster
Rep:
|
HI,
Now its working. I can access site using http://webmail.rtscmail.in.
any idea to to secure it using https://
Thanks for help....
|
|
|
03-28-2011, 07:29 AM
|
#11
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
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
|
|
|
03-29-2011, 07:18 AM
|
#12
|
Member
Registered: Mar 2011
Posts: 32
Original Poster
Rep:
|
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.
|
|
|
03-29-2011, 07:35 AM
|
#13
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
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.
|
|
|
03-29-2011, 07:52 AM
|
#14
|
Member
Registered: Mar 2011
Posts: 32
Original Poster
Rep:
|
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
|
|
|
03-29-2011, 08:17 AM
|
#15
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
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.
|
|
|
All times are GMT -5. The time now is 03:30 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|