Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have standard Apache configuration. At domain.com Apache is serving static html files (No backend technology)

At domain.com:2368, there is a Ghost (blogging platform) instance, running NodeJS.

I want to have the following effect:

People should come in at domain.com/blog and it should redirect (the content, not the URL) to the Ghost instance at the specific port.

So far, i have managed to make blog.domain.com to point at Ghost, but I want /blog to work too.

Here is my main VH:

<VirtualHost *:80>
    ServerAdmin admin@domain.com

    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>

Here is the additional VH which redirects the port to blog.domain.com

    <VirtualHost *:80>  
    ServerName blog.domain.com
    ProxyPass / http://127.0.0.1:2368/
    ProxyPassReverse / http://127.0.0.1:2368/
    ProxyPreserveHost On
    </VirtualHost>
share|improve this question
    
ProxyPass /blog http://127.0.0.1:2368 ... in your domain.com vhost –  Iain Jan 12 at 15:19
    
Yes but Ghost is looking for resources and not finding them that way :/ –  Radoslav Georgiev Jan 12 at 15:49
    
GET domain.com/assets/css/screen.css 404 (Not Found) blog:17 GET domain.com/shared/vendor/jquery/jquery.js 404 (Not Found) blog:84 GET domain.com/assets/js/index.js 404 (Not Found) blog:87 –  Radoslav Georgiev Jan 12 at 15:58
1  
It seems that Ghost is not supporting subdirectories right now - ghost.org/forum/installation/… –  Radoslav Georgiev Jan 12 at 16:18

1 Answer 1

up vote 0 down vote accepted

Ghost added support for this in 0.4 - https://github.com/TryGhost/Ghost/wiki/Release-Notes:-0.4.0

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.