어떻게 든 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 디버그를 사용하면 많은 도움이 되었습니다.

관련 정보