LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   HTTPS Configuration (http://www.linuxquestions.org/questions/linux-newbie-8/https-configuration-697849/)

rajaguru14 01-16-2009 10:04 PM

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
~

billymayday 01-16-2009 10:09 PM

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.

rajaguru14 01-17-2009 12:36 AM

Answer me for web server, not for mail server
 
Quote:

Originally Posted by billymayday (Post 3411589)
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

billymayday 01-17-2009 01:22 AM

Quote:

Originally Posted by rajaguru14 (Post 3411680)
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.


All times are GMT -5. The time now is 10:11 AM.