Forum Moderators: phranque
I need to turn of the HTTP port 80 on Apache web server and use only HTTPS 443 in a highly secure environment.
Tried commenting the lines with PORT 80 (the HTTP port, ref #ANDY COMMENT) in httpd.conf, but this doesn't work.
#
# Port: The port to which the standalone server listens. For
# ports < 1023, you will need httpd to be run as root initially.
#
#ANDY COMMENT Port 80
##
## SSL Support
##
## When we also provide SSL we have to listen to the
## standard HTTP port (see above) and to the HTTPS port
##
<IfDefine SSL>
#ANDY COMMENT Listen 80
Listen 443
</IfDefine>
Is it possible to achieve the same? If so please let me know how?
Thanks in advance,
Anand
You could use a simple redirect like:
Redirect permanent / https://www.example.com/
# see [modssl.org...] for more info
SSLMutex sem
SSLRandomSeed startup builtin
SSLSessionCache none
SSLProtocol -all +SSLv3
SSLCipherSuite HIGH:MEDIUM
SSLLog logs/SSL.log
# SSLLogLevel info
SSLLogLevel warn
<virtualhost localhost:443>
SSLEngine On
SSLCertificateFile conf/ssl/localhost.cert
SSLCertificateKeyFile conf/ssl/localhost.key
</virtualhost>
<Directory "C:/server/htdocs/admin/phpMyAdmin">
SSLRequireSSL
</Directory>
I haven't tried it, but maybe specifiying that your entire htdocs directory "RequireSSL" would work?