Answer the question
In order to leave comments, you need to log in
How to correctly register several sites in the form name.ru/site1 name.ru/site2?
Good afternoon. There is a domain with an Ubuntu ghost DO droplet and I want to start several platforms for tests / drafts, etc., but always under one domain in the form
domain.com/ghostsite1
domain.com/ghostsite2
domain.com/wordpresssite1
domain.com/wordpresssite2
domain.com/ customblogplatform
domain.com/htmlpage
How to do it right? More precisely, how should this whole thing be registered in nginx?
Thank you.
Answer the question
In order to leave comments, you need to log in
And why don't you use third-level domains like ghostsite1.domain.com , ghostsite2.domain.com , etc.
From the pluses, you can make a universal nginx configuration file, where, depending on the 3rd-level domain, a variable will be formed, on the base of which will already form the path to the root directory of the site root. Well, or just for each 3rd-level domain, make a separate virtual host config in the image and likeness of the one next to it (replacing a couple of directives).
Do better on subdomains, because if the site uses absolute paths, nothing will work normally. + there will be problems with cookies, etc.
And just create directories site1, site2, etc. and put scripts there. You don't need to configure anything additionally.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question