How To Proxy Port 80 To 2368 For Ghost With Nginx

Article By peggy


ghost Port 80 VPS BIP media hosting

Intro to Port 80

Follow this tutorial to install Ghost. Make your Ghost blog accessible on port 80 instead of 2368.

We will use Nginx to proxy all requests for port 80 to 2368. Start by installing Nginx with one of the following commands, depending on what operating system you are running:


For CentOS the first thing you will need to do is create a Nginx yum repository:
vim /etc/yum.repos.d/nginx.repo

and then paste the following into that file:
name=nginx repo baseurl=$releasever/$basearch/ 

Install Nginx with the following command: sudo yum install nginx -y sudo service nginx start sudo chkconfig nginx on


sudo apt-get install nginx -y

After Nginx is installed on your Server, the next step is to tell Nginx to listen for Ghost on port 2368. Next add a new Nginx configuration files into /etc/nginx/conf.d/. We would recommend creating your configuration file in this directory and naming it something meaningful, like:

your-domain-name.conf. Once you have created your new Nginx conf file place the following into your file, replacing with your domain name:

server {
    listen 80;
    location / {
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host      $http_host;

If you find a sample Nginx configuration files found in /etc/nginx/conf.d/, deleting them.  Restart Nginx to make your changes take affect: #### CentOS and Ubuntu

sudo service nginx restart

Your Ghost blog is now reachable via your domain name, on port 80, through Nginx to port 2368. For more great tutorials on topics like How To Proxy Port 80 To 2368 For Ghost With Nginx check out the Community Learning Center and search for your topic of interest. If you have any comments or thoughts and or ideas leave them bellow. We would love to get your feedback!

Tags: , , , , , , ,

Spin Up A VPS Server In No Time Flat

Simple Setup

Full Root Access

Straightforward Pricing


Leave a Reply