Question

how can I create a folder to be a sub directory on my domain

I installed ghostblog and cannot put another folder on the /var/www to work.

eg: www.domain.com/subdirectory to be /var/www/subdirectory


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.

@sergiofilhow: On the Ghost blog one-click app, the configuration is located at <code>/etc/nginx/conf.d/default.conf</code>

Thanks for your help guys. I’ve found the config file, but it didn’t work. I think that’s something related to the ghostblog config. <br> <br>Here’s the config content. <br> <br>server { <br> #listen 80; ## listen for ipv4; this line is default and implied <br> #listen [::]:80 default ipv6only=on; ## listen for ipv6 <br> <br> root /usr/share/nginx/www; <br> index index.html index.htm; <br> <br> # Make site accessible from http://localhost/ <br> server_name www.sergio.filho.org; <br> <br> location / { <br> # First attempt to serve request as file, then <br> # as directory, then fall back to index.html <br> try_files $uri $uri/ /index.html; <br> # Uncomment to enable naxsi on this location <br> # include /etc/nginx/naxsi.rules <br> } <br> <br> location /doc/ { <br> alias /usr/share/doc/; <br> autoindex on; <br> allow 127.0.0.1; <br> deny all; <br> } <br> <br> location /sites/ { <br> alias /var/www/sites; <br> try_files $uri $uri/ /index.html; <br> } <br> <br> # Only for nginx-naxsi : process denied requests <br> #location /RequestDenied { <br> # For example, return an error code <br> #return 418; <br> #} <br> <br> #error_page 404 /404.html; <br> <br> # redirect server error pages to the static page /50x.html <br> # <br> #error_page 500 502 503 504 /50x.html; <br> #location = /50x.html { <br> # root /usr/share/nginx/www; <br> #} <br> <br> # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 <br> # <br> #location ~ .php$ { <br> # fastcgi_split_path_info ^(.+.php)(/.+)$; <br> # # NOTE: You should have “cgi.fix_pathinfo = 0;” in php.ini <br> # <br> # # With php5-cgi alone: <br> # fastcgi_pass 127.0.0.1:9000; <br> # # With php5-fpm: <br> # fastcgi_pass unix:/var/run/php5-fpm.sock; <br> # fastcgi_index index.php; <br> # include fastcgi_params; <br> #} <br> <br> # deny access to .htaccess files, if Apache’s document root <br> # concurs with nginx’s one <br> # <br> #location ~ /.ht { <br> # deny all; <br> #} <br>}

It’s usually in <code>/etc/nginx/sites-enabled</code>.