之前一直用 docker 部署,现在打算直接部署,遇到了这个问题。 域名: http(s)://ex.hencolle.com/ NS/CDN 和 SSL 都是 CloudFlare 提供,直接将 docker 中的 sql 数据和 html 数据取出来覆盖了 /var/www/hencolle 。目前 CloudFlare 上关掉了 CDN / SSL / HSTS 这个 VPS 上原本就部署了一个网站,占用了 80 和 443 端口。
/var/www/hencolle/.htaccess
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^hencolle\.com$ [NC] RewriteRule ^(.*)$ http://ex.hencolle.com/$1 [R=301,L] </IfModule> /etc/apache2/sites-available/hencolle.conf
<VirtualHost *:80> Protocols h2c http/1.1 ServerName ex.hencolle.com ServerAdmin [email protected] DocumentRoot /var/www/hencolle RedirectMatch permanent ^/(.*) https://ex.hencolle.com/$1 </VirtualHost> wp-config.php
define('WP_HOME','http://ex.hencolle.com'); define('WP_SITEURL','http://ex.hencolle.com'); 求助
