Install Ghost On Ubuntu

Create the NGINX server block:

sudo nano /etc/nginx/sites-available/ghost

Now add the following so it knows where Ghost is located:

server {
    listen 80;
    server_name localhost;

    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header HOST $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://127.0.0.1:2368;
        proxy_redirect off;
    }
}

Save the file and exit

Now it’s time to activate the new and then remove the server default:

sudo ln -s /etc/nginx/sites-available/ghost /etc/nginx/sites-enabled/ghost
sudo rm /etc/nginx/sites-enabled/default

Comments

0 responses to “Install Ghost On Ubuntu”

Leave a Reply

Your email address will not be published. Required fields are marked *