Fun at zangOOr Click Here
1 like 0 dislike
65 views
in Education & Reference by (3.3k points) | 65 views

1 Answer

1 like 0 dislike
Best answer
vi /etc/httpd/conf/httpd.conf

<VirtualHost *:80>

     RewriteEngine On

     RewriteCond %{HTTPS} off

     #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

     ServerAdmin [email protected]

     DocumentRoot /var/www/html/

     ServerName subdomain57.domain.com

     ServerAlias subdomain57.domain.com

     ErrorLog /var/www/html/error.log

RewriteCond %{SERVER_NAME} =subdomain57.domain.com

RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

</VirtualHost>



Include /etc/httpd/conf/httpd-le-ssl.conf

------------------------------------------------------------------

vi /etc/httpd/conf/httpd-le-ssl.conf

<IfModule mod_ssl.c>

<VirtualHost *:443>

     RewriteEngine On

# Some rewrite rules in this file were disabled on your HTTPS site,

# because they have the potential to create redirection loops.



#      RewriteCond %{HTTPS} off

#      #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

#      ServerAdmin [email protected]

#      DocumentRoot /var/www/html/

#      ServerName subdomain57.domain.com

#      ServerAlias subdomain57.domain.com

#      ErrorLog /var/www/html/error.log

# RewriteCond %{SERVER_NAME} =subdomain57.domain.com

# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

ServerName subdomain57.domain.com

Include /etc/letsencrypt/options-ssl-apache.conf

SSLCertificateFile /etc/letsencrypt/live/subdomain57.domain.com/cert.pem

SSLCertificateKeyFile /etc/letsencrypt/live/subdomain57.domain.com/privkey.pem

SSLCertificateChainFile /etc/letsencrypt/live/subdomain57.domain.com/chain.pem

</VirtualHost>

</IfModule>
by (1.4k points)
selected by

Related questions

3 like 0 dislike
1 answer
asked May 27 in Education & Reference by Yogi (360 points) | 82 views
0 like 0 dislike
1 answer
0 like 0 dislike
0 answers
0 like 0 dislike
1 answer
asked Oct 23, 2018 in Education & Reference by Krish (790 points) | 174 views
2 like 0 dislike
10 answers
asked Oct 23, 2018 in Education & Reference by Sam (1.4k points) | 814 views
2 like 0 dislike
2 answers
asked May 30, 2020 in Education & Reference by john (80 points) | 207 views
0 like 0 dislike
1 answer
asked Sep 5, 2019 in Computers & Internet by Neha (950 points) | 123 views
1 like 0 dislike
1 answer
1 like 0 dislike
1 answer

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,244 questions
1,398 answers
564 comments
4,809 users