如何在 PuPHPet 生成的配置文件中设置 Nginx 重写规则?
How do I set up Nginx rewrite rules in a config file generated from PuPHPet?
"config.yaml" 文件中的示例:
locations:
...
some_location_root:
location: /
try_files:
- $uri
- '@rwr'
some_location_rewrite:
location: '@rwr'
rewrite: '^(.*) /index.php?_controller= last'
...
我在这里找到了解决方案:
https://github.com/jfryman/puppet-nginx/blob/master/spec/defines/resource_location_spec.rb
rewrite: '^(.*) /index.php?_controller= last'
应该看起来像:
rewrite_rules: ['^(.*) /index.php?_controller= last']
"config.yaml" 文件中的示例:
locations:
...
some_location_root:
location: /
try_files:
- $uri
- '@rwr'
some_location_rewrite:
location: '@rwr'
rewrite: '^(.*) /index.php?_controller= last'
...
我在这里找到了解决方案: https://github.com/jfryman/puppet-nginx/blob/master/spec/defines/resource_location_spec.rb
rewrite: '^(.*) /index.php?_controller= last'
应该看起来像:
rewrite_rules: ['^(.*) /index.php?_controller= last']