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:

CentOS

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:

[nginx] 
name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ 
gpgcheck=0
enabled=1

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

Ubuntu

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 your-domain-name.conf.com with your domain name:

server {
    listen 80;
    server_name your-domain-name.conf.com;
    location / {
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host      $http_host;
        proxy_pass         http://127.0.0.1:2368;
    }
}

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 cloud server in no time flat

Simple setup. Full root access. Straightforward pricing.


DEPLOY SERVER




Leave a Reply