# Installation on v-server as a subfolder with other services in subfolders using apache

**URL:** https://meta.discourse.org/t/installation-on-v-server-as-a-subfolder-with-other-services-in-subfolders-using-apache/39731
**Category:** Self-hosting
**Created:** [February 17, 2016, 12:33pm UTC](https://meta.discourse.org/t/installation-on-v-server-as-a-subfolder-with-other-services-in-subfolders-using-apache/39731 "2016-02-17T12:33:08Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [February 20, 2016, 5:26pm UTC](https://meta.discourse.org/t/installation-on-v-server-as-a-subfolder-with-other-services-in-subfolders-using-apache/39731/11 "2016-02-20T17:26:23Z")

</div>

> [@JohnDoe1](#):
>
> I got it working halfway, but there are more difficulties: creating my first user account (for the admin) leeds to an activation link that doesn’t work. It starts with “[http://http](http://http)://domain…” and if i copy the link cutting the first "“http://” it gets me to a discourse site “The page you requested doesn’t exist or is private”. The login doesn’t work telling me I need to activate the account first…

Yikes 😮, this is not good and looks like your nginx configuration is broken. Did you set up everything as shown in the tutorial, including the `proxy_set_header` directives?

> [@JohnDoe1](#):
>
> Also the starting page is not working as I expected. I don’t use subdomains (as [sub.domain.com](http://sub.domain.com)), but instead [domain.com/discourse](http://domain.com/discourse) (no idea how to call this). Is this a problem?

This is fine if and only if you follow this howto:

> [@Serve Discourse from a subfolder (path prefix) instead of a subdomain](https://meta.discourse.org/t/subfolder-support-with-docker/30507):
>
> warning Discourse Official Statement about Subfolder setup We support subfolder setups for our hosted customers at the enterprise level and up. Due to heavy technical setup complexity we strongly recommend you do not use this setup unless you are very experienced in custom subfolder setups. It is critical you have a deep understanding of NGINX setup in the Discourse Docker container Secure original IP forwarding using custom headers in the proxy chain Rate limiting in front proxy server I…

Discourse needs to know it is running in a subfolder or all links will be broken; the tutorial above configures this.

If you follow the combination of this and [the original](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247) howto, you _should_ have a working Discourse as long as you stop Apache and start nginx for a moment. If this is not the case, can you post your nginx configuration files?

> [@JohnDoe1](#):
>
> For the further part, after the basic setup is working I need to enable ssl and then I consider serving my other webservices (owncloud, dokuwiki and a very simple html website) also via nginx, as I figure it will probably be easier than negotiating between apache and nginx. Does that make sense?

I’m not sure all of this works under nginx (as ownCloud needs PHP, which is not my forte). Setting up nginx to route requests to Apache should be relatively easy, I have a working setup using this apprach.

---

_[View the full topic](https://meta.discourse.org/t/installation-on-v-server-as-a-subfolder-with-other-services-in-subfolders-using-apache/39731)._
