How to run Apache & Ghost running on same Droplet?

November 17, 2013 5.7k views
I want to run both my Ghost blog (blog.domain.com) and simple html site (domain.com) on one Droplet. I've managed to put it together on two Droplets, it's fairly easy, just had to adjust hostname settings using either A Records and CNAME since both blog and html site are running on different IP addresses. So, created one new Droplet on which I installed Ghost using DigitalOcean application (Ubuntu 12.04) and then I tried to install apache but I got the following message "(98)Address already in use: make_soc: could not bind to address 0.0.0.0:80". Opened up FileZilla, changed the port to 8080 and site root location as well as sites-available and sites-enabled, but I still get 404 error whenever I try to open my html site using IP address/index.html. In my www directory there is currently two directories, "ghost" and "site". What am I doing wrong?
9 Answers
by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one domain off of a single IP address and allows you to run multiple sites off of a single DigitalOcean droplet. This tutorial describes how to set up virtual hosts with Apache.
Yes, of course. Still it says that port 80 is not available.
by Justin Ellingwood
Ghost is a blogging platform focused on easy content creation and beautiful presentation. In this guide, we will discuss how to host multiple Ghost blogs on a single VPS by utilizing nginx server blocks.
I recommend setting up nginx instead of apache as it integrates better with nginx. See https://www.digitalocean.com/community/articles/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts--3
by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one website or domain off of a single server and IP address. When used with nginx, virtual hosts are called Server Blocks. This tutorial covers setting up server blocks on an Ubuntu server.
Honestly, gave up on the idea because every tutorial I tried I got some kind of error and couldn't proceed. Tutorials are newb friendly, but when you get to the point where you get some kind of error it's just complicated and since I'm no Linux expert it's no use :) Googled it and googled it and couldn't get it to work. Going to lay off it for a few days and get back to it so if I do get it do work I'll let you guys know. Thanks for the help.
Did you set point proxy port correctly?

Ghost apps port at localhost : http://127.0.0.1:2368
Don't set to your apache port : http://127.0.0.1:8080

If you run NGINX as frontend proxy for your web server listening ON GHOST. If Port Still it says that port 80 is not available, you can check what is runing on your port 80, may be your Apache default virtual box still runing on port 80. You can check that port with command:

sudo netstat -ntlp | grep :80
Oh.. im sorry, thats command for Debian/Ubuntu platform to check whats program runing on port : 80. "Apache Default virtual box" i mean virtualhost. Dont forget to check your apache "port.conf" it's run NameServer *:80? To understand linux, first understand what you want to do with your server, understand how to use the application one by one. If you want to use the instant application, use the facilities provided by the provider.

When i read from your post you want to run GHOST at your sub domain "blog.domain.com", and not yor main doman "domain.com" Did you change or create new virtual host:

ServerName blog.domain.com ==> for ghost bloging run at sub domain

and set up new virtual host

ServerName domain.com ==> for your html web run at main domain

==="So, created one new Droplet on which I installed Ghost using DigitalOcean application (Ubuntu 12.04) and then I tried to install ***apache*** but I got the following message "(98)Address already in use: make_soc: could not bind to address 0.0.0.0:80".""

Why you install apache? Did you realy read how to set up virtual host on nginx? (If you us NGINX).

Ghost forum?
https://ghost.org/forum/
You want to run ghost on apache? Here some guide, not test it yet. I hope it help.

http://blog.0x1a.us/installing-ghost-using-apache/
Hi,
I have a tutorial, I'm using it on my droplet for running some Ghost blogs.
http://www.tfq.me/how-to-host-multiple-ghost-blogs-on-ubuntu-12-04-using-apache/
Have another answer? Share your knowledge.