Welcome! Log In Create A New Profile

Advanced

nginx add trailing slash with wrong port

May 24, 2014 02:53PM
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>
Subject Author Posted

nginx add trailing slash with wrong port

luc2 May 24, 2014 02:53PM

Re: nginx add trailing slash with wrong port

itpp2012 May 24, 2014 04:27PM

Re: nginx add trailing slash with wrong port

Dustin Oprea May 24, 2014 04:36PM

Re: nginx add trailing slash with wrong port

Francis Daly May 28, 2014 07:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready