Nginx Question

I setup a VPS running the Ghost application using the pre-made offering. How can I setup Nginx to serve up a plain http directory for images and misc files that aren’t part of the Ghost blog? Everything I do results in a Ghost 404 page not found error.

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thanks, that worked perfectly!

Edit it the file “/etc/nginx/conf.d/default.conf” and add a new location block so that it looks like: <br> <br><pre> <br>server { <br> listen 80; <br> server_name ; <br> <br> client_max_body_size 10M; <br> <br> location / { <br> proxy_pass http://localhost:2368/; <br> proxy_set_header Host $host; <br> proxy_buffering off; <br> } <br> <br> location /files { <br> root /var/www; <br> } <br>} <br></pre> <br> <br>Then create a directory named “/var/www/files” Now any files that you put in that directory will be available at:

You could try setting up a PHP server with tasksel and create an image folder and serv files through there. Im not sure it would work though.