
Ich habe eine Standard-Apache-Konfiguration. domain.com
Apache stellt statische HTML-Dateien bereit (keine Backend-Technologie)
Unter domain.com:2368
gibt es eine Ghost-Instanz (Blogging-Plattform), auf der NodeJS ausgeführt wird.
Ich möchte folgenden Effekt erzielen:
Die Leute sollten hereinkommen domain.com/blog
und (der Inhalt, nicht die URL) sollte zur Ghost-Instanz am bestimmten Port weitergeleitet werden.
Bisher habe ich es geschafft, blog.domain.com
auf Ghost hinzuweisen, aber ich möchte /blog
auch arbeiten.
Hier ist mein Haupt-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>
Hier ist der zusätzliche VH, der den Port auf blog.domain.com umleitet
<VirtualHost *:80>
ServerName blog.domain.com
ProxyPass / http://127.0.0.1:2368/
ProxyPassReverse / http://127.0.0.1:2368/
ProxyPreserveHost On
</VirtualHost>
Antwort1
Ghost hat hierfür Unterstützung in 0.4 hinzugefügt -https://github.com/TryGhost/Ghost/wiki/Release-Notes:-0.4.0