Open d0dge opened 8 years ago
The last regex location will catch any uri that ends in .php, even if it starts with "rainloop". That's because nginx first parses the location prefixes, and then moves on to the location regexes. If you want nginx to skip the regex matching if a certain prefix match is made, use the "^~" modifier. Try:
location ^~ /rainloop {
...
}
The nginx location documentation has more details.
Also, don't you need to pass to your php handler?
Perfect thank you emesch, that did the trick.
Yes you're right, I did need to add my php handler in there too. I've amended the rainloop location to this and it seems to work OK:
location ^~ /rainloop {
root /usr/share/nginx/;
index index.html index.htm index.php;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi.conf;
}
Is there any reason why I should put the PHP handling in a separate block? Something like:
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi.conf;
}
This is more of a request for assistance than an issue so apologies if it shouldn't have been posted here. Hopefully someone can help though!
I'm trying to get Rainloop webmail up and running on a server that also hosts a Drupal site. I'm using Perusio's Nginx config.
I basically just want to add a location to handle the path to Rainloop so that the webmail will be accessible via https://example.com/rainloop.
I've added the following just outside the default location block in drupal.conf:
It's returning 404 even though the paths are correct. I suspect it's to do with one or both of these locations at the end of the config:
How do make an exception to these 404 rules for the rainloop directory?