Related to this post: Ghost as a sub directory using NGINX
First of all Serverpilot has a different setup so there is no /etc/nginx/sites-enabled/
instead you have something like this: /etc/nginx-sp/vhosts.d/ghost.d/
where “ghost.d” is the directory corresponding is the Serverpilot .d I’ve created.
I’m aiming to create a new file called devnull.conf in that folder with this content
location ^~ /devnull/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:2369;
proxy_redirect off;
}
NOTE:
My first blog is in https://blikonsult.se
and runs Ghost on 2368
My second blog will be in https://blikonsult.se/devnull/
and runs Ghost on 2369
Which will end up in the server {} tag due to how Serverpilot:
include conf file include /etc/nginx-sp/vhosts.d/ghost.d/*.conf;
- I’m I doing things right? Do I have to do anything in .htaccess?
- This might help people in future and the previous issue was closed.