Php Wordpress Apache调整SSL

Php Wordpress Apache调整SSL,php,wordpress,apache,ssl,https,Php,Wordpress,Apache,Ssl,Https,你好,我有一个在我自己的计算机托管网站。我在上面安装了wordpress和apache。获得域名并在cloudflare上注册。他们还提供了一个免费的证书,我把它放在文件夹.crt和.key文件中。下面是我对apache的ssl和非ssl的配置 HTTPS <VirtualHost *:443> ServerName hascelin.fun ServerAdmin hascelin@gmail.com DocumentRoot /var/www/html/h

你好,我有一个在我自己的计算机托管网站。我在上面安装了wordpress和apache。获得域名并在cloudflare上注册。他们还提供了一个免费的证书,我把它放在文件夹.crt和.key文件中。下面是我对apache的ssl和非ssl的配置

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>

ServerName hascelin.fun
服务器管理员hascelin@gmail.com
DocumentRoot/var/www/html/hascelin.fun/
ServerAlias www.hascelin.fun
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
选项索引跟随符号链接多视图
允许超越所有
命令允许,拒绝
通融
#重新启动发动机
#RewriteCond%{SERVER_NAME}=www.hascelin.fun[或]
#RewriteCond%{SERVER_NAME}=hascelin.fun
#重写规则^https://%{SERVER_NAME}%{REQUEST_URI}[END,NE,R=permanent]
斯伦金安
SSLCertificateFile/home/orest/cert/hascelin.crt
SSLCertificateKeyFile/home/orest/cert/hascelin.key
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

ServerName hascelin.fun
服务器管理员hascelin@gmail.com
DocumentRoot/var/www/html/hascelin.fun/
ServerAlias www.hascelin.fun
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
选项索引跟随符号链接多视图
允许超越所有
命令允许,拒绝
通融
#重新启动发动机
#RewriteCond%{SERVER_NAME}=www.hascelin.fun[或]
#RewriteCond%{SERVER_NAME}=hascelin.fun
#重写规则^https://%{SERVER_NAME}%{REQUEST_URI}[END,NE,R=permanent]
#斯伦金安
#SSLCertificateFile/home/orest/cert/hascelin.crt
#SSLCertificateKeyFile/home/orest/cert/hascelin.key


媒体文件正在从http加载

所有媒体文件都是从http加载的,还是只有少数媒体文件?是否确定代码中没有写入包含“http”的路径?您是否有.htaccess文件?