create role nginx

This commit is contained in:
vincent 2019-04-14 15:51:48 +02:00
parent c5d2c85ee9
commit 2c57e52633
3 changed files with 42 additions and 1 deletions

View File

@ -82,6 +82,10 @@
- install - install
- config - config
- [ ] dns role
-slave/primary
- [ ] mariadb role - [ ] mariadb role
- install - install
- config - config

View File

@ -44,3 +44,39 @@ fail2ban_sendmail: "{{ user.mail }}"
Gandi_API_KEYS: "{{ vault_gandi_API_Keys }}" Gandi_API_KEYS: "{{ vault_gandi_API_Keys }}"
Gandi_Domain: "{{ domain.name }}" Gandi_Domain: "{{ domain.name }}"
Gandi_Record: www Gandi_Record: www
nginx_vhosts:
- listen: "80"
server_name: "localhost"
root: "/usr/share/nginx/html/"
error_page: "404 /404/404.html"
filename: "default.conf"
state: "present"
template: "{{ nginx_vhost_template }}"
extra_parameters: |
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location =/ {
rewrite ^ /starter;
}
location / {
index index.php index.html index.htm ;
default_type text/html;
}
location ~ \.php$ {
# try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 800;
fastcgi_index index.php;
include fastcgi_params;
}
nginx_realIP_Proxy: 192.168.1.10/24

View File

@ -15,6 +15,7 @@
- gandi-dyn-dns - gandi-dyn-dns
- fail2ban - fail2ban
- dns - dns
- {role: nginx, become: yes }
- tt-rss - tt-rss
- gitea - gitea
- user_config - user_config