Added role nginx/php
parent
5dad519f90
commit
8e28bcb0ec
@ -0,0 +1,8 @@
|
||||
---
|
||||
|
||||
# domain: "example.com"
|
||||
# system_user: "www-data"
|
||||
# src: "/of/php/files"
|
||||
# pool_name from nginx/php-pool
|
||||
# includes: ...
|
||||
# env_vars: ...
|
@ -0,0 +1,13 @@
|
||||
---
|
||||
|
||||
allow_duplicates: yes
|
||||
|
||||
dependencies:
|
||||
- role: nginx/application
|
||||
- role: acme/certificate
|
||||
# domain
|
||||
- role: nginx/php-pool
|
||||
# system_user
|
||||
# src
|
||||
# pool_name
|
||||
# includes
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
|
||||
- name: Configure forward in nginx
|
||||
template:
|
||||
src: server.conf
|
||||
dest: "{{ nginx_sites_directory }}/{{ domain }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "u=rw,g=r,o="
|
||||
notify: reload nginx
|
@ -0,0 +1,31 @@
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name {{ domain }};
|
||||
|
||||
ssl on;
|
||||
ssl_certificate {{ acme_certificate_location }};
|
||||
ssl_certificate_key {{ acme_key_location }};
|
||||
|
||||
include {{ nginx_snippets_directory }}/https;
|
||||
include {{ nginx_snippets_directory }}/global;
|
||||
|
||||
index index.php index.html index.htm index.nginx-debian.html;
|
||||
root {{ src }};
|
||||
fastcgi_hide_header X-Powered-By;
|
||||
|
||||
location ~\.php$ {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
try_files $uri =404;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param HTTPS on;
|
||||
fastcgi_param modHeadersAvailable true;
|
||||
fastcgi_param front_controller_active true;
|
||||
fastcgi_pass {{ pool_name }};
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_request_buffering off;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue