Making VirtualHost changes permanent
Hi, i don't understand how these includes work.
If i got it right any change made directly to httpd.conf they will be lost on /scripts/rebuildhttpdconf
I am userdata/std/2_4/... <- This doesn't exist, and the include is a comment so... it won't pick it up even if create them.
All i want to do is add this to one of the VirtualHost:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.*)$ [NC]
RewriteRule (.*) https://domain.com%{REQUEST_URI} [END,QSA,R=permanent]- ]
- Where should this file be placed?
- How should the file be called?
- What should the file contain? A copy of the virtualhost modified? The entire httpd.conf modified?
-
Solved: - ]
- Created /etc/apache2/conf.d/userdata/std/2_4/... directory.
- Created "ssl.conf" file with the code above inside directory
- Un-commented include line on httpd.conf ( Include "/etc/apache2/conf.d/...)
- Run /scripts/rebuildhttpdconf
0 -
Hello, You can follow the instructions from the following document when making custom changes to Apache on a server using EasyApache 4: Advanced Apache Configuration - EasyApache 4 - cPanel Documentation That page includes a link to the following document, which you may also find helpful: Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation Thank you. 0
Please sign in to leave a comment.
Comments
2 comments