我正在尝试过滤路径以专门执行以下操作(按此顺序我认为):
我目前的NGINX配置是:
server {
listen 443 http2 ssl;
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
ssl_certificate /etc/nginx/ssl/fsmunkireport.stockton.edu.cer;
ssl_certificate_key /etc/nginx/ssl/fsmunkireport.stockton.edu.key;
#ssl_dhparam /etc/nginx/ssl/dhparam.pem;
location = / {
return 301 https://fqdn/PROD/index.php?;
}
location ~ ^\/PROD\/index.php\?\/report(.*) {
allow all;
index index.php;
autoindex on;
location ~* \.php$ {
try_files $uri =404;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME /secure/PPRD/$fastcgi_script_name;
include fastcgi_params;
include fastcgi.conf;
}
}
location /PROD {
allow x.x.x.x/16;
deny all;
index index.php;
autoindex on;
location ~* \.php$ {
try_files $uri =404;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME /secure/PPRD/$fastcgi_script_name;
include fastcgi_params;
include fastcgi.conf;
}
}
}
我遇到的问题是通过该php子路径进行过滤。由于它不是文字目录,我想我只是在混淆自己。基本上在这一点上,所有流量都是通过NGINX允许的,这不是理想的行为。
非常感谢任何协助。