Question

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

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?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

P.S. There is mistake in example, should be +forum not “discuss”, just posting to avoid confusion

+**site**
   somefiles.php
   somedirctories
   +

+**forum**
   somefiles.php
   somedirctories