# Ghost as a sub directory using NGINX

**URL:** <https://forum.ghost.org/t/ghost-as-a-sub-directory-using-nginx/1499>\
**Category:** Developer help\
**Created:** [June 4, 2018, 5:31pm UTC](https://forum.ghost.org/t/ghost-as-a-sub-directory-using-nginx/1499 "2018-06-04T17:31:14Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Hannah](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hannah/32/22_2.png) [@Hannah](https://forum.ghost.org/u/Hannah)\
**Post date:** [June 4, 2018, 6:37pm UTC](https://forum.ghost.org/t/ghost-as-a-sub-directory-using-nginx/1499/4 "2018-06-04T18:37:20Z")

</div>

> [@belltyler](#):
>
> If I use the Ghost-CLI can I still use a sqlite database?

Yes of course, the options for `ghost install` are documented here:  
[https://docs.ghost.org/docs/cli-install#section-options](https://docs.ghost.org/docs/cli-install#section-options)

> [@belltyler](#):
>
> Also, I already have a NGINX config file for the rest of my site. So will the ghost populated NGINX files overwrite, or cause any issues with the existing config file?

The CLI will create entirely new, separate files, as per the templates I linked to above & then will symlink those into place in /etc/nginx/sites-enabled/. No existing files will be touched.

If there is some configuration elsewhere in your nginx config that “trumps” or conflicts with the Ghost config, it could definitely still cause trouble. Undoing that would be a case of removing the added symlinks and restarting nginx. Our templates deliberately do not use the `default_server` directive, which reduces most opportunity for conflict.

---

_[View the full topic](https://forum.ghost.org/t/ghost-as-a-sub-directory-using-nginx/1499)._
