server - nginx: Looking to serve multiple subdirectories as their own root -


using nginx, there way run multiple subdirectories own self contained roots (document root)?

i going have several (40+) projects run in subdirectories:

  • frontend.example.com/project_1
  • frontend.example.com/project_2
  • frontend.example.com/project_3

each projects pushed own location /var/www/html/project_name. there not site @ frontend.example.com

some projects due way set need run if root. contain sources <img src="/images">. page looking @ front.example.com/images , not front.example.com/project_a/images.

can run each of these projects subdirectories root folder; stopping @ front.example.com/project_name/?

what i've tried hasn't worked

creating separate sites-available / sites-enabled , config files. tedious since need every site , kept running issues. halted path save myself rabbit hole, can provide config files, if preferred direction.

what has worked far...

in sites-available/default having aliases. having location /images/ @ alias /var/www/html/project_a/images/. works, hard coding project_a, , potentially lot of separate project, not ideal.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -