Compress location config

macindy nginx-forum at nginx.us
Mon Jan 4 22:49:29 MSK 2010


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




More information about the nginx mailing list