如何在PuPHPet生成的配置文件中设置Nginx重写规则?

时间:2015-05-03 08:44:38

标签: nginx vagrant puphpet

来自" config.yaml"的示例文件:

locations:
  ...
  some_location_root:
    location: /
    try_files:
      - $uri
      - '@rwr'

  some_location_rewrite:
    location: '@rwr'
    rewrite: '^(.*) /index.php?_controller=$1 last'
  ...

1 个答案:

答案 0 :(得分:2)

我在这里找到了解决方案: https://github.com/jfryman/puppet-nginx/blob/master/spec/defines/resource_location_spec.rb

<str name="Total Rows Fetched">10</str>

应该是这样的:

rewrite: '^(.*) /index.php?_controller=$1 last'