Hi Francis, thank you for your helpful posts! Also thanks for the answer in my other thread from last December. I just now spotted your response there. You are right: location ^~ /wiki/images { # Separate location for /wiki/images root /home/wiki/www; } This is all I needed. I thought the root would be inherited as it is set in the location / block already. Obviously this is notby Joergi - Nginx Mailing List - English
Thanks for the notes! I am on a shared server and there already is some kind of server configuration. I sadly cannot even see this server config, but I know it contains lots of location blocks, which at least partly interfere with what I am trying to do. That is why I use modifiers to make _my_ blocks kick in instead of theirs. You might say I should change the host ... sadly it's not so easy..by Joergi - Nginx Mailing List - English
Hi guys, I am having a configuration, which is basically rewriting all requests, for which a fitting file cannot be found, to a central index.php file: location ~* "^/" { root /home/$username/www/; try_files $uri $uri/ /wiki/index.php$is_args$args; location ~ \.php$ { try_files $uri $uri/ /wiki/index.php$is_args$args; include /etc/nginx/fastcgi_params; fastcgi_passby Joergi - Nginx Mailing List - English
Hallo Matthias! Thanks for your post, it brought me on the right track! Additionally, I found the MediaWiki ShortURL Builder at https://shorturls.redwerks.org/. From there I added a few more {deny all;} rules. And the result seems to be working now! Thanks again ... und viele Grüße Jörgby Joergi - Nginx Mailing List - English
Hi guys, I am running a MediaWiki installation and I am using this block of rules to rewrite requests to MediaWiki: location ~ \.php { root /home/$username/www/; index index.php index.html; try_files /dummy/$uri @php; } However, this is creating the problem that wiki pages, which end on .php can no longer be accessed. Instead, nginx only responds with "File not founby Joergi - Nginx Mailing List - English
Hi Francis, thanks for your answer! > You don't say what you want to happen to those other files, so I will > leave it at "nothing special". Yes, that is right. Files in other folders, also if the names of the files end on php5, should not be rewritten. > That is: no-slash, or /wiki/ then no-slash. > > rewrite ^/([^/]*)\.php5 /$1.php permanent; > reby Joergi - Nginx Mailing List - English
Hi guys, I am new to nginx and I need to do a few rewrites, which I need help with. I currently have this configuration: location ~ \.php5 { root /home/$username/www/; rewrite ^/(.*)\.php5 /$1.php permanent; } The problem with this is that it rewrites the files, also if they are in subfolders - and this is what I do not want. I have a root folder and inside it there is aby Joergi - Nginx Mailing List - English