Report this

What is the reason for this report?

One droplet, one domain, two parts of site in different locations (LEMP) - help!

Posted on June 5, 2016

So I have 2 sites or rather parts of the same site but they have slightly different stacks/role. It will all sit under one droplet and same domain. Those parts are:

1. News site - accessible from homepage (mydomain.xyz) and a lot of pages after trailing slash /, static files only, no-db (I use flat file CMS) 2. Forum - that visitors are able to access under mydomain.xyz/forum/, PHP+MYSQL

Now, my concerns are, that if I add forum physically inside main site directory, there might be some sort of clutch between those 2 platforms. Think of it like having a ruby app nested inside of php app. To give you better picture:

Currently its like this - forum lives inside flat file CMS:

+site
   somefilesforsite.php
   +someotherdirectoriesforsite
        somemorefilesforsite.html
   +forum
       somefiles.php
       somedirctories
       +someforumdirectories
            somemorefilesforforum.html
  

I would prefer this way - have it all in separate directories:

+**site**
   somefiles.php
   somedirctories
   +

+**discuss**
   somefiles.php
   somedirctories

… yet I would like the forum to show under mydomain.xyz/forum like is literally inside directory of main/root site and:

a) this whole set-up it’s secure - if in future I will add someone to maintain forum, they won’t have an access to main site b) if the main site is down for some reasons, users still have access to forum and vice-versa c) I can configure for each their own nginx rules so they don’t affect each other in any way (file permissions etc.)

…How to achieve that?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.