0
Answered

NginX FastCGI URL-Pattern

Spancer Am 10 year бұрын updated by Eugene Pankov (Project coordinator) 10 year бұрын 5
Hi,

I run various applications under domain.com/NAME 
Now I want to add each under Website so i can handle the Maintmode separately. 
Not sure where I have to file in what that it works. I think the problem is under FastCGI the URL-Pattern.
I think the best idea would be to make separate websites listen on 127.0.0.1:<separate-port>, and then add a custom server {} with multiple locations which would proxy_pass to the previously configured websites based on NAME in URL.
Custom servers can be put into /etc/nginx.custom.d/
Any good documentation? Never worked with NginX before. 
It's pretty easy. Actually you can configure that "proxying" website from ajenti-v too. Simply create multiple locations (per "child" website) in it, of type "Reverse proxy" and set their URLs to http://127.0.0.1:<child-port> (and don't forget to set desired url pattern).
Thanks will try and may come back with new questions :)