Apache: domain.com:2368을 domain.com/blog로 리디렉션하는 방법

Apache: domain.com:2368을 domain.com/blog로 리디렉션하는 방법

표준 Apache 구성이 있습니다. Apache 에서는 domain.com정적 HTML 파일을 제공합니다(백엔드 기술 없음).

에는 domain.com:2368NodeJS를 실행하는 Ghost(블로깅 플랫폼) 인스턴스가 있습니다.

다음과 같은 효과를 원합니다.

사람들이 들어와서 domain.com/blog특정 포트의 Ghost 인스턴스로 리디렉션(URL이 아닌 콘텐츠)되어야 합니다.

지금까지 나는 blog.domain.comGhost를 지적할 수 있었지만 나도 /blog일하고 ​​싶습니다.

내 주요 VH는 다음과 같습니다.

<VirtualHost *:80>
    ServerAdmin [email protected]

    DocumentRoot /srv/www/htdocs/domain.com/
    ServerName domain.com
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /srv/www/htdocs/domain.com/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

다음은 포트를 blog.domain.com으로 리디렉션하는 추가 VH입니다.

    <VirtualHost *:80>  
    ServerName blog.domain.com
    ProxyPass / http://127.0.0.1:2368/
    ProxyPassReverse / http://127.0.0.1:2368/
    ProxyPreserveHost On
    </VirtualHost>

답변1

Ghost는 0.4에서 이에 대한 지원을 추가했습니다.https://github.com/TryGhost/Ghost/wiki/Release-Notes:-0.4.0

관련 정보