不知何故破壞了我的 Apache2 vhost.conf 文件,現在所有站點都被重定向到一個

不知何故破壞了我的 Apache2 vhost.conf 文件,現在所有站點都被重定向到一個

最近選擇將我的所有網站合併到一台伺服器上。我之前將它們分成兩台機器,每台機器都成功支援多個網域。合併各自的 vhost.conf 檔案後,我破壞了一些東西。現在對任何網域的請求都被重新導向到一個:https://explorer.bitcoin-rebooted.xyz:3001

在 Gentoo linux 4.19.57 下執行 apache 2.4.41

希望有另一雙眼睛關注這一點,顯然我錯過了一些基本的東西。

vhost.conf,進行了一些編輯以防止其被視為垃圾郵件:

<VirtualHost *:80>
Servername kevinsthoughts.com
Redirect "/" "https://www.kevinsthoughts.com"
</VirtualHost>

<VirtualHost *:80>
Servername www.kevinsthoughts.com
Redirect "/" "https://www.kevinsthoughts.com"
</VirtualHost>

<VirtualHost *:443>
Servername www.kevinsthoughts.com
DocumentRoot /home/thoughts/public_html/wordpress
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/www.kevinsthoughts.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.kevinsthoughts.com/privkey.pem
<Directory "/home/thoughts/public_html/wordpress">
    Require all granted
</Directory>
</VirtualHost>

<VirtualHost *:443>
Servername forum.kevinsthoughts.com
DocumentRoot /home/thoughts/public_html/smf
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/forum.kevinsthoughts.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/forum.kevinsthoughts.com/privkey.pem
<Directory "/home/thoughts/public_html/smf">
    Require all granted
</Directory>
</VirtualHost>

<VirtualHost *:443>
Servername web.carpenter-farms.us
DocumentRoot /var/www/localhost
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/web.carpenter-farms.us/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/web.carpenter-farms.us/privkey.pem
</VirtualHost>

<VirtualHost *:80>
Servername explorer.bitcoin-rebooted.xyz
Redirect "/" "http://explorer.bitcoin-rebooted.xyz:3001"
</VirtualHost>

<VirtualHost *:80>
Servername www.bitcoin-rebooted.xyz
Redirect "/" "https://www.bitcoin-rebooted.xyz"
</VirtualHost>

<VirtualHost *:443>
Servername bitcoin-rebooted.xyz
Redirect "/" "https://www.bitcoin-rebooted.xyz"
</VirtualHost>

<VirtualHost *:443>
Servername www.bitcoin-rebooted.xyz
DocumentRoot /coin/btr/public_html/wordpress
Setenv VLOG /var/logs
<Directory "/coin/btr/public_html/wordpress">
     AllowOverride all
     Require all granted
  </Directory>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/www.bitcoin-rebooted.xyz/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.bitcoin-rebooted.xyz/privkey.pem
</VirtualHost>

答案1

最後有幾個問題。

使用而不是固定幾個站點。

重定向伺服器之一上的 php-fpm 設定檔已重設為預設值,這導致了一些錯誤。

其餘錯誤則是伺服器之間的連接埠遺留下來的面向 Wordpress 控製檔案的錯誤。

猜測 Memcached 的使用使事情變得複雜,因為需要多次刷新才能獲得有意義的回應。

在 apache 中使用 LogLevel 偵錯有很大幫助。

相關內容