Здравствуйте, у меня есть сайт на моем собственном компьютере.Я настраиваю WordPress и Apache на нем.Получил доменное имя и зарегистрировал его на cloudflare.Они также предлагают бесплатный сертификат, который я получил и положил в папку .crt и .key файлы.Вот моя конфигурация для ssl и non-ssl для apache
HTTPS
<VirtualHost *:443>
ServerName hascelin.fun
ServerAdmin hascelin@gmail.com
DocumentRoot /var/www/html/hascelin.fun/
ServerAlias www.hascelin.fun
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/hascelin.fun/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =www.hascelin.fun [OR]
#RewriteCond %{SERVER_NAME} =hascelin.fun
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
SSLEngine on
SSLCertificateFile /home/orest/cert/hascelin.crt
SSLCertificateKeyFile /home/orest/cert/hascelin.key
</VirtualHost>
HTTP
<VirtualHost *:80>
ServerName hascelin.fun
ServerAdmin hascelin@gmail.com
DocumentRoot /var/www/html/hascelin.fun/
ServerAlias www.hascelin.fun
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/hascelin.fun/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =www.hascelin.fun [OR]
#RewriteCond %{SERVER_NAME} =hascelin.fun
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
#SSLEngine on
#SSLCertificateFile /home/orest/cert/hascelin.crt
#SSLCertificateKeyFile /home/orest/cert/hascelin.key
Файлы мультимедиа загружаются с http