mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-06 08:51:37 +01:00
fix: use nginx for php fpm
This commit is contained in:
@@ -63,10 +63,11 @@
|
||||
working_dir: /var/www/
|
||||
when: not project_stat.stat.exists
|
||||
|
||||
- name: Install php-fpm
|
||||
- name: Install php-fpm & nginx
|
||||
apt:
|
||||
pkg:
|
||||
- php-fpm
|
||||
- nginx
|
||||
|
||||
- name: Configure php-fpm listen
|
||||
lineinfile:
|
||||
@@ -78,12 +79,19 @@
|
||||
lineinfile:
|
||||
path: /etc/php/8.1/fpm/pool.d/www.conf
|
||||
regex: ^listen = .*$
|
||||
line: listen = 0.0.0.0:8080
|
||||
line: listen = 0.0.0.0:9000
|
||||
notify: restart php-fpm
|
||||
|
||||
- name: Configure php-fpm listen allowed clients
|
||||
lineinfile:
|
||||
path: /etc/php/8.1/fpm/pool.d/www.conf
|
||||
regex: ^;*listen.allowed_clients = .*$
|
||||
line: listen.allowed_clients = 192.168.122.1
|
||||
#line: listen.allowed_clients = 192.168.122.1
|
||||
line: listen.allowed_clients = 127.0.0.1
|
||||
notify: restart php-fpm
|
||||
|
||||
- name: Configure nginx
|
||||
template:
|
||||
src: default-nginx.conf
|
||||
dest: /etc/nginx/sites-available/default
|
||||
notify: restart nginx
|
||||
|
||||
15
roles/typo3-cms/templates/default-nginx.conf
Normal file
15
roles/typo3-cms/templates/default-nginx.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
server {
|
||||
listen 8080;
|
||||
index index.php index.html;
|
||||
root /var/www/html/public;
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user