Linux http jump to https service

1. We first create 2 machines, one is the CA server and the other is the httpd server

ca.cdll.com30.10.10.101DNS serverCA server
web.cdll.com30.10.10.102web serverssl

2. Apply for a certificate with the CA server, so that web.cdll.com can access https://30.10.10.102

2. Go to the website configuration file vim /etc/httpd/conf/httpd.conf

Add http jump command

Website configuration:


rewriteengine on
 
rewritecond %{https} !=on
 
rewriterule ^(.*) https://%{SERVER_NAME}/$1 [R,L]

http forwarding should be added to the website configuration file set by yourself

2. Now when visiting http, he will jump to https by himself and add 2 //

Remember to turn off the firewall and selinux, and create a web server configuration, but I think you have come here, you should

The web server and CA certificate will be done, if not, you can ask me privately

Leave a Reply

Your email address will not be published. Required fields are marked *

en_USEnglish