How To Proxy Port 80 to 2368 For Ghost With Apache

If you followed one of our posts on How To Install Ghost we highly suggest going through this post right after installing Ghost so that your Ghost blog is accessible on port 80 instead of 2368. We will accomplish this by using Apache to proxy all requests for port 80 to 2368. So to start, make sure you are in your root user, install Apache with one of the following commands, depending on what operating system you are running:

yum install -y httpd
apt-get install -y apache2

Create a new file in the following directories called yoursite.conf

vi /etc/httpd/conf.d/yoursite.conf
vi /etc/apache2/sites-enabled/yoursite.conf

Add the following into these conf files change the urls to your website

NameVirtualHost *:80 
<VirtualHost *:80> 
    ProxyRequests off 
    ProxyPass / 
    ProxyPassReverse / 	

Now restart Apache

/usr/sbin/setsebool httpd_can_network_connect true sudo service httpd restart
sudo a2enmod proxy proxy_http && sudo service apache2 restart

Your Ghost blog is now reachable via your domain name, on port 80, through Apache to port 2368.