nginx rewrites :
> http://localhost:8081/files
to :
> http://localhost:81/files/ # wrong port !
while apache rewrites :
> http://localhost:8082/files
to
> http://localhost:8082/files/
is it possible to configure nginx to behave like apache ?
/etc/nginx/conf.d/test.conf :
> server {
> listen 81;
> location /files {
> alias /home/luc2/files;
> autoindex on;
> }
> }
/etc/httpd/conf.d/test.conf :
> <VirtualHost *:82>
> Alias /files /home/luc2/files
> <Directory /home/luc2/files>
> Options indexes
> Allow from all
> </Directory>
> </VirtualHost>