Apache 웹 서버 문제

Apache 웹 서버 문제

인증서를 추가하기 전에 다음 사이트에 액세스할 수 있었습니다.

http://website.com:4043/web/login

하지만 인증서를 추가한 후에는 https를 사용하여 전체 URL에 액세스할 수 없습니다.
그러나 나는 단지 액세스할 수 있습니다https://website.com

어떤 지원이라도 부탁드립니다.

답변1

최신 버전의 Ubuntu를 실행한다고 가정하면 Apache 가상 구성 파일이 다음과 같은지 확인해야 합니다.

Listen 443
Listen 4043

<VirtualHost *:443>
    ServerName website.com

    SSLProxyEngine on
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/server.crt
    SSLCertificateKeyFile /etc/ssl/private/server.key
    DocumentRoot /var/www/html
</VirtualHost>

<VirtualHost *:4043>
    ServerName website.com

    SSLProxyEngine on
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/server.crt
    SSLCertificateKeyFile /etc/ssl/private/server.key
    DocumentRoot /var/www/html
</VirtualHost>

여기에서 .htaccess트래픽이 4043서버 기본값인 443. 예를 들어:

RewriteEngine on

# If the port isn't 4043
RewriteCond %{SERVER_PORT} !^4043$

# We redirect to the same address with the proper port
RewriteRule ^(.*)$ https://%{HTTP_HOST}:4043/$1 [R=301,L]

중요한:이 내용을 단순히 복사하여 붙여넣지 마십시오. 모두가 모르는 내용을 본문을 보고 자신의 환경에 맞게 조정해 보세요제외하고너.

관련 정보