LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-16-2009, 10:04 PM   #1
rajaguru14
LQ Newbie
 
Registered: Nov 2008
Posts: 23

Rep: Reputation: 15
HTTPS Configuration


I have configured HTTPS Web Server in RedHat

I changed the file

# /etc/httpd/conf/httpd.conf

<VirtualHost 192.168.1.5:80>
Documentroot /var/www/html/
DirectoryIndex index.html
ServerAdmin root@station5.example.com
ServerName station5.example.com
</VirtualHost>

and I created the certificate in

# cd /etc/pki/tls/certs/
# make server.key
# make server.crt
# cp server.key /etc/pki/tls/private/

and then I edited the file

# cd /etc/httpd/conf.d/ssl.conf

these are the following files that I edited

85 ServerName station5.example.com:443
112 SSLCertificateFile /etc/pki/tls/certs/server.crt
119 SSLCertificateKeyFile /etc/pki/tls/private/server.key

then I restarted the service httpd

the I opened the brower and then I entered the URL: station5.example.com

it came as http://station5.example.com
I want it to come as https://station5.example.com, automatically

Note: One of my friend told me , ServerAlias should be used , but I cant understand


Kindly please help me , Thanks in advance
~

Last edited by rajaguru14; 01-17-2009 at 12:21 AM.
 
Old 01-16-2009, 10:09 PM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Here's the entry I use in my httpd.conf for my https site
Code:
<VirtualHost  *:443>
        ServerName webmail.example.com

        DocumentRoot /usr/share/squirrelmail

        ServerAdmin webmaster@example.com

        DirectoryIndex index.php index.html index.htm index.shtml

        ErrorLog logs/example.com/ssl_error_log
        CustomLog logs/examplecom/ssl_access_log common
        CustomLog logs/example.com/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

SSLEngine On
SSLCertificateFile /etc/pki/tls/certs/www.example.com.cert
SSLCertificateKeyFile /etc/pki/tls/private/www.example.com.key

</VirtualHost>
Clearly this is used for webmail.

I'm sure there are other ways to achieve the same result.
 
Old 01-17-2009, 12:36 AM   #3
rajaguru14
LQ Newbie
 
Registered: Nov 2008
Posts: 23

Original Poster
Rep: Reputation: 15
Answer me for web server, not for mail server

Quote:
Originally Posted by billymayday View Post
Here's the entry I use in my httpd.conf for my https site
Code:
<VirtualHost  *:443>
        ServerName webmail.example.com

        DocumentRoot /usr/share/squirrelmail

        ServerAdmin webmaster@example.com

        DirectoryIndex index.php index.html index.htm index.shtml

        ErrorLog logs/example.com/ssl_error_log
        CustomLog logs/examplecom/ssl_access_log common
        CustomLog logs/example.com/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

SSLEngine On
SSLCertificateFile /etc/pki/tls/certs/www.example.com.cert
SSLCertificateKeyFile /etc/pki/tls/private/www.example.com.key

</VirtualHost>
Clearly this is used for webmail.

I'm sure there are other ways to achieve the same result.

You Have told me the configuration for mail server , tell me for web server
 
Old 01-17-2009, 01:22 AM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Quote:
Originally Posted by rajaguru14 View Post
You Have told me the configuration for mail server , tell me for web server
No it isn't - as I clearly stated, it's httpd.conf - that is, web server.

Change the documentroot if that's where your problem is.
 
  


Reply

Tags
configuration, https


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
Squid configuration question. Client => HTTPS => proxy => HTTP => webserver newhere Fedora 5 02-21-2009 01:33 PM
https:// wwnexc Linux - Software 3 11-05-2005 11:57 PM
https help! chidomen Linux - Newbie 5 01-17-2005 01:26 PM
HTTPS is gone murkok Linux - Software 1 07-22-2004 07:30 AM
Https Chijtska Linux - Networking 2 03-06-2002 03:44 PM


All times are GMT -5. The time now is 02:34 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration