Welcome! Log In Create A New Profile

Advanced

Re: Compress location config

Igor Clark
January 06, 2010 02:46PM
Hi there, you can put the fastcgi_param, fastcgi_index and include
directives outside the location blocks, in fact according to
http://wiki.nginx.org/NginxHttpFcgiModule they work in both server (per
virtual host) and http (all virtual hosts) contexts. Then they should
apply to all of the locations. fastcgi_pass needs to be per location.
You could try gluing the paths together into a single regex if you
really want, but it would probably be clearer to leave them separate,
no?

cheers
Igor Clark


macindy wrote:
> Hi nginx community!
>
> I am new to nginx and my regex knowledge is just basic.
> Can somebody help me to compress these three rules:
>
>
> location ~ ^/forum/vbseo_sitemap/.+\.php$ {
> fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
> fastcgi_index index.php;
> fastcgi_pass phpload;
> include /etc/nginx/fastcgi_params;
> }
>
> location ~ ^/forum/.+\.php$ {
> fastcgi_param SCRIPT_FILENAME
> $document_root/forum/vbseo.php;
> fastcgi_index index.php;
> fastcgi_pass phpload;
> include /etc/nginx/fastcgi_params;
> }
>
> location ~ .*\.php$ {
> fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
> fastcgi_index index.php;
> fastcgi_pass phpload;
> include /etc/nginx/fastcgi_params;
> }
>
>
> Thanks - Best regards
> macindy
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,36765,36765#msg-36765

--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Compress location config

macindy January 04, 2010 02:49PM

Re: Compress location config

Igor Clark January 06, 2010 02:46PM

Re: Compress location config

Tobia Conforto January 08, 2010 10:38AM

Re: Compress location config

macindy January 08, 2010 03:56PM

Re: Compress location config

merlin corey January 08, 2010 07:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 289
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready