why that rewrite rule enforces trailing slash
I've the following rewrite rule on location /, and it enforces trailing slash!location / {rewrite ^(\/.*) https://example.com/ar$1 permanent;}each, time I curl mydomain.com, I got the following...
View ArticleRe: why that rewrite rule enforces trailing slash
http://stackoverflow.com/questions/18422092/how-to-remove-trailing-slash-from-url-in-nginx-only-if-directory-doesnt-existwww.nginxtips.com/nginx-remove-trailing-slash/
View ArticleRe: why that rewrite rule enforces trailing slash
I don't think that stackoverflow question is related to mine! I don't have a redirect loop! and my root directive is outside my location block!
View ArticleRe: why that rewrite rule enforces trailing slash
$1 at least has a slash.map $request_uri $requri {default $request_uri;/ "";}[...]rewrite ^(\/.*) https://example.com/ar$requri permanent;
View ArticleRe: why that rewrite rule enforces trailing slash
Thank you itpp2012, but is there a reference for "$1 at least has a slash" ? Or people get it by practice :) ?!
View ArticleRe: why that rewrite rule enforces trailing slash
Mostly by practice :)Just make a number of test location blocks and see which one works, then figure out a mapping to prevent using if's.
View Article"aio on" is unsupported on this platform
Hello!I am attempting to enable asynchronous I/O for my NGINX server but I get the following error:> sudo nginx -t -c /etc/nginx/nginx.conf[emerg] "aio on" is unsupported on this platform in...
View ArticleRe: "aio on" is unsupported on this platform
http://hg.nginx.org/nginx/rev/4dc8e7b62216
View ArticleProblem with fastcgi_param SCRIPT_FILENAME.
I have setup nginx 1.8 with php-fpm support and it is working as it should, except for this small problem..If I use:fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;I get Access...
View ArticleRe: Problem with fastcgi_param SCRIPT_FILENAME.
It means root <> /www/domaindiradding:root '/www/domaindir';should fix it.
View ArticleRe: Problem with fastcgi_param SCRIPT_FILENAME.
I already have that in my config... My config looks like this:server {listen 80;server_name www.domain.no;access_log /var/log/nginx/domain-access.log;error_log /var/log/domain-error.log;location /...
View ArticleRe: Problem with fastcgi_param SCRIPT_FILENAME.
I see a root inside 1 location block but not inside the block where you have the problem, place root at server block level or repeat it in each location block.Add_header $docroot and use curl to see...
View Articletrying to get my downloads folder
I have NGINX installed on a VPN and I would like to access the "downloads" folder via https. I followed instructions given to me as follows:Now, in order to download your files from your vpn, you will...
View ArticleRate Limiter not working for index.php
I am using this location block with phplocation ~ \.php$ {try_files $uri =404;limit_req zone=limit burst=3 nodelay;fastcgi_pass php_farm;include nginx.fastcgi.conf;}If I go to localhost/testxxx.php and...
View ArticleRedirect cgi-bin directory
Dear ForumI need your help because I'm stock on following issue:I have a small portal on / there I have location which redirects me to an internal device in this Example my Router.The Root rule is...
View ArticleRe: Rate Limiter not working for index.php
Yes! I finally found a fix after reviewing this awesome article:https://www.digitalocean.com/community/tutorials/understanding-nginx-server-and-location-block-selection-algorithmsI added this below my...
View ArticleGetting reverse proxy to work with dynamic request routing
I took the "Dynamic Request Routing Based on Redis" example from openresty.org and enabled reverse proxy but haven't been able to get the reverse proxy part of it to work. Reverse proxy works fine for...
View Articleon the fly transcode video file for download
Dears,I am planning on using Nginx to setup a vod system with multi-lingual video files.The files would be stored on the server as one single mp4 file, with multiple audio tracks in it.For the vod...
View ArticleRe: OCSP stapling via web proxy
same here. does anybody know how nginx creates the outgoing connections?I've checked the source and didn't find how (probably because I'm not a C developer.. :-)...
View Article