nc.varie
By:
nc.varie

Running Ghost on domain.com and Apache subdirectory

May 4, 2014 1.9k views
Hi everyone! I would like to ask some advices regarding Ghost and Apache. I'm using Apache for running my homepage (static HTML) and two Drupal website (var/www/drupal1 e /var/www/drupal2). I did not set any virtual server or anything, it's everything very basic! I would like to start using Ghost, but at the same time, leaving there the two Drupal websites. What I should do? I was thinking: 1. Find a way of leaving Apache only for domain.com/drupal1 and domain.com/drupal2 (how??) 2. Create a subdirectory blog.domain.com with Ghost, and simply using Apache to forward everyone who is trying to access domain.com there (but I would prefer to not alter the url and leave my domain.com) 3. Replace apache with nginx, but I am afraid of encountering problems with Drupal. Any suggestions? and mostly..how can I do such things (links for guide/tutorial are very much appreciated!) ? :D Thanks in advance!
1 Answer
You should be able to set it up so domain.com serves the Ghost blog and domain.com/drupal1 and domain.com/drupal2 serve your Drupal sites. You'll need to use a ProxyPass to serve Ghost, so the key is to exclude the Drupal sites from the proxy. In your Apache conf, you'll need something like:


ProxyPass /drupal1 !
Alias /foo /var/www/drupal1

ProxyPass /drupal2 !
Alias /foo /var/www/drupal2

ProxyPass / http://127.0.0.1:2368
ProxyPassReverse / http://127.0.0.1:2368
ProxyPreserveHost On
RewriteEngine On
RewriteOptions inherit


Notice that we define the Drupal sites first.

Let us know how it goes!
Have another answer? Share your knowledge.