我已经成功地建立了一个Wordpress Multisite与LAMP,它目前有以下结构
我为三个域创建了虚拟主机配置,将三个域映射到同一个WordPress多点目录,并且我正在运行WordPress MU域映射插件来处理重定向,到目前为止,它在http上运行得很好。
然后,我为https创建了证书:
并在虚拟主机配置中为所有域设置自动https重定向。
现状:
有人能帮我弄清楚问题在哪里吗?
我正在考虑为b.com中的每个子域创建虚拟主机配置,但它更像是补丁而不是补丁。
发布于 2019-05-12 21:56:23
似乎我错了虚拟主机配置文件将所有http请求重定向到https。
这是我目前的工作配置:
/etc/apache2/sites-available/a.com.conf
ServerAdmin admin@a.com
ServerName a.com
ServerAlias *.a.com
DocumentRoot /var/www/a.com/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =a1.a.com [OR]
RewriteCond %{SERVER_NAME} =a.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]/etc/apache2/sites-available/a.com-le-ssl.conf
ServerAdmin admin@a.com
ServerName a.com
ServerAlias *.a.com
DocumentRoot /var/www/a.com/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/a.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/a.com/privkey.pem但是,需要更新我需要的每个子域的虚拟主机配置RewriteCond %{SERVER_NAME} =a1.a.com [OR],因此该过程不是自动化的。
https://wordpress.stackexchange.com/questions/337667
复制相似问题