Nginx alias and regex

view full story

http://serverfault.com – i'll need a bit of help for alias on folder with nginx I have my folder www/ with the container of my site example.com and a lot of folder like client0, client1, client2... I should NOT modify www/example/ but i need that example.com/serveur0/ to be redirected to www/client0/ I made a nginx rule like this : location /serveur0/ { alias /www/client0/; index index.php location ~ /serveur0/(.*\.php)$ { fastcgi_pass; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$1; include /etc/nginx/fastcgi_params; } } (HowTos)