mirror of
https://github.com/HanXHX/ansible-php.git
synced 2026-04-27 14:32:09 +07:00
⚗️ Modernize and add CI
This commit is contained in:
16
molecule/_shared/templates/custom_template.conf.j2
Normal file
16
molecule/_shared/templates/custom_template.conf.j2
Normal file
@@ -0,0 +1,16 @@
|
||||
# {{ ansible_managed }} - custom template
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 8888 http2;
|
||||
listen 9999 http2 proxy_protocol;
|
||||
server_name {{ item.name }};
|
||||
|
||||
index index.html index.htm;
|
||||
|
||||
root {{ item.root }};
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
45
molecule/_shared/templates/nginx.conf.j2
Normal file
45
molecule/_shared/templates/nginx.conf.j2
Normal file
@@ -0,0 +1,45 @@
|
||||
events {
|
||||
worker_connections 512;
|
||||
multi_accept on;
|
||||
use epoll;
|
||||
}
|
||||
|
||||
user www-data;
|
||||
worker_processes 1;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
server {
|
||||
server_name {{ vhost }};
|
||||
|
||||
root /var/www;
|
||||
|
||||
{% if ansible_local.hanxhx_php.fpm_pool.0.status_path is defined %}
|
||||
location = {{ ansible_local.hanxhx_php.fpm_pool.0.status_path }} {
|
||||
include fastcgi.conf;
|
||||
fastcgi_pass unix:{{ ansible_local.hanxhx_php.fpm_pool.0.listen }};
|
||||
}
|
||||
{% endif %}
|
||||
{% if ansible_local.hanxhx_php.fpm_pool.0.ping_path is defined %}
|
||||
location = {{ ansible_local.hanxhx_php.fpm_pool.0.ping_path }} {
|
||||
include fastcgi.conf;
|
||||
fastcgi_pass unix:{{ ansible_local.hanxhx_php.fpm_pool.0.listen }};
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
location = /ini.php {
|
||||
include fastcgi.conf;
|
||||
fastcgi_pass unix:{{ ansible_local.hanxhx_php.fpm_pool.1.listen }};
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi.conf;
|
||||
fastcgi_pass unix:{{ ansible_local.hanxhx_php.fpm_pool.0.listen }};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user