37 lines
No EOL
1.3 KiB
Text
37 lines
No EOL
1.3 KiB
Text
<IfModule mod_ssl.c>
|
|
<VirtualHost *:443>
|
|
ServerAdmin <your email>
|
|
ServerName www.<your website>
|
|
ServerAlias <your website>
|
|
DocumentRoot /var/www/html/<your website>/web
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
|
|
SSLEngine on
|
|
SSLCertificateFile <path to SSLCertificateFile.pem>
|
|
SSLCertificateKeyFile <path to SSLCertificateKeyFile.key>
|
|
# Depending on your provider, you may not need a SSLCertificateChainFile
|
|
# SSLCertificateChainFile <path to SSLCertificateChainFile.crt>
|
|
|
|
# Rewrite rule to redirect www.<your website> to <your website>
|
|
# RewriteEngine on
|
|
# RewriteCond %{SERVER_NAME} =<your website>
|
|
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
|
# OR
|
|
# Rewrite rule to redirect <your website> to www.<your website>
|
|
# RewriteEngine on
|
|
# RewriteCond %{SERVER_NAME} =example.com
|
|
# RewriteRule ^ https://www.%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent
|
|
|
|
<Directory /var/www/html/<your website>/web>
|
|
Options FollowSymlinks
|
|
AllowOverride All
|
|
Require all granted
|
|
RewriteEngine on
|
|
RewriteBase /
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
RewriteRule ^(.*)$ index.php?q= [L,QSA]
|
|
</Directory>
|
|
</VirtualHost>
|
|
</IfModule> |