Jump to content

Recommended Posts

 

Hello all,

 

How do I only allow https connection to my apache server? With current configuration I have, when the client connect to http://xxxx:8076, firefox will prompt to use the https connection with the suggested url https://xxxx.8076.

I don't want the client connecting to http url then RewriteRule directs the connection to https url. What I would like to see is every time the client connect via http will be denied or errored out.

 

<VirtualHost *:8076>

DocumentRoot "/opt/apache/htdocs"

ServerName xxxx

#SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

# CQ 4767 and CQ # 6834

<IfModule mod_rewrite.c>

  RewriteEngine on

  RewriteCond %REQUEST_METHOD ^(TRACE|TRACK)

  RewriteRule .* - [F]

</IfModule>

SSLEngine on

SSLCertificateFile /opt/apache/conf/ssl.crt/xxxx.crt

SSLCertificateKeyFile /opt/apache/conf/ssl.key/xxxx.key

 

SSLProtocol all -SSLv2

SSLCipherSuite ALL:+EXP:!ADH:!NULL:!EXPORT40:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:-LOW:+SSLv3:+TLSv1:-SSLv2

 

 

</VirtualHost>

 

 

Any suggestions?

 

Thanks. :)

Link to comment
https://forums.phpfreaks.com/topic/126358-only-allow-https-not-http/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.