Nginx: setup `public_folder` to serve html and similar files?

After installing the Ghost droplet (running Nginx) I’ve realised that there is no public_folder or www folder where I can drop random html files and other docs (e.g. Google Webmaster Tools domain verification file).

Is anyone aware of the configuration/changes required to have a public_folder up and running on Nginx without affecting the security of the server?

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

@ar: Are you sure these are the only virtual host config files? There doesn’t seem to be a virtual host for the ghost blog,

<pre> <br>server { <br> listen 80; <br> server_name; <br> rewrite ^/(.*)$1 permanent; <br>} <br> <br>server { <br>root /usr/share/nginx/www; <br>index index.html index.htm; <br> <br>server_name localhost; <br> <br>location / { <br> try_files $uri $uri/ /index.html;
<br> } <br> <br>location /doc/ { <br> alias /usr/share/doc/; <br> autoindex on; <br> allow; <br> deny all; <br> } <br>} <br></pre>

Please pastebin your nginx virtualhost config file.