Hi everyone, I just installed ghost and I am having some trouble hosting some non-ghost content on my server. I would like to have ghost as homepage, but host in (example) /var/www/static a PDF file, or another HTML page. I sincerely do not know what to do. Reading around I tried to change my /etc/nginx/conf.d/default.conf
<pre> server { listen 80; server_name nicolacarboni.com; root /var/www/ghost/content/themes/chiara;
location / {
try_files $uri @proxy;
}
location @proxy {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
} </pre> In order to host on /var/www/ghost/content/themes/chiara static files, but it does not work… Do you have some solutions?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You can set this up with an alias directive in your Nginx configuration:
<pre> server { listen 80; server_name nicolacarboni.com; root /var/www/ghost/content/themes/chiara;
location / {
try_files $uri @proxy;
}
location @proxy {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
location /static/ {
alias /var/www/static/;
}
} </pre>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.