Open jkounis opened 10 years ago
Hello,
Thanks for your question. This has a very simple solution. Try this:
## Advanced Help module makes each module provided README available.
location ^~ /help/ {
location ~* ^/help/[^/]*/(?:advanced_help/[[:alpha:]]*|README\.txt)$ {
## Include the specific FastCGI configuration. This is for a
## FCGI backend like php-cgi or php-fpm.
include apps/drupal/fastcgi_drupal.conf;
}
}
Thank you perusio. You pointed me in the right direction. Those exact location strings did not work for me, but modified versions worked. The location string you provided seems to require help//advanced_help; however, the paths I need are in the format help/advanced_help/. There is also a path help/devel/README_devel_nodeaccess.txt that needs to work too. Finally, [[:alpha:]] did not work for me because paths have "-" and "" characters in them.
I changed it as follows:
## Advanced Help module makes each module provided README available. location ^~ /help/ { location ~* ^/help/(?:advanced_help/[A-Za-z0-9_-]*|[^/]*/README[^/]*\.txt)$ { ## Include the specific FastCGI configuration. This is for a ## FCGI backend like php-cgi or php-fpm. include apps/drupal/fastcgi_drupal.conf; } }
Or simply:
## Advanced Help module makes each module provided README available. location ^~ /help/ { location ~* ^/help/(?:advanced_help/[^/]*|[^/]*/README[^/]*\.txt)$ { ## Include the specific FastCGI configuration. This is for a ## FCGI backend like php-cgi or php-fpm. include apps/drupal/fastcgi_drupal.conf; } }
The only advanced help links that work with these configuration files are links that match the pattern ^/help/[^/]*/README.txt$. The problem is that advanced help does not only serve files that end with README.txt. For example, the advanced help module itself has help files with the following URIs:
All of these generate 404 errors with the current Drupal 7 configuration.
I suggest the attached patch as a way to generalize the handling of advanced help URIs.