mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-02-26 09:12:09 +07:00
Add new feature: nginx_fastcgi_fix_realpath
This commit is contained in:
@@ -19,3 +19,16 @@
|
||||
dest="{{ nginx_etc_dir }}/conf.d/custom.conf"
|
||||
notify: reload nginx
|
||||
|
||||
- name: LINEINFILE | Fix path
|
||||
lineinfile: >
|
||||
regexp='{{ item.0.regexp }}'
|
||||
line='{{ item.0.line }}'
|
||||
dest='{{ item.1 }}'
|
||||
with_nested:
|
||||
-
|
||||
- regexp: '^fastcgi_param SCRIPT_FILENAME'
|
||||
line: 'fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;'
|
||||
- regexp: '^fastcgi_param DOCUMENT_ROOT'
|
||||
line: 'fastcgi_param DOCUMENT_ROOT $realpath_root;'
|
||||
- [ '/etc/nginx/fastcgi_params', '/etc/nginx/fastcgi.conf' ]
|
||||
when: nginx_fastcgi_fix_realpath
|
||||
|
||||
Reference in New Issue
Block a user