chore: update staging branch with current changes
This commit is contained in:
36
deployment/ansible/playbooks/fix-phpfpm-config.yml
Normal file
36
deployment/ansible/playbooks/fix-phpfpm-config.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
- name: Check and Fix PHP-FPM Configuration
|
||||
hosts: production
|
||||
gather_facts: yes
|
||||
become: no
|
||||
|
||||
tasks:
|
||||
- name: Check PHP-FPM www.conf configuration for allowed_clients
|
||||
shell: |
|
||||
cd ~/deployment/stacks/staging
|
||||
echo "=== PHP-FPM www.conf listen.allowed_clients ==="
|
||||
docker compose exec -T staging-app cat /usr/local/etc/php-fpm.d/www.conf 2>&1 | grep -E "(listen|allowed_clients|listen\.owner|listen\.group|listen\.mode)" | head -15
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: fpm_config
|
||||
ignore_errors: yes
|
||||
failed_when: false
|
||||
|
||||
- name: Display PHP-FPM config
|
||||
debug:
|
||||
msg: "{{ fpm_config.stdout_lines }}"
|
||||
|
||||
- name: Check nginx error log for specific PHP-FPM errors
|
||||
shell: |
|
||||
cd ~/deployment/stacks/staging
|
||||
echo "=== Nginx Error Log (all lines) ==="
|
||||
docker compose logs --tail=200 staging-nginx 2>&1 | grep -iE "(502|bad gateway|upstream|php|fpm|connection)" || echo "No specific errors found"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: nginx_error_log
|
||||
ignore_errors: yes
|
||||
failed_when: false
|
||||
|
||||
- name: Display nginx error log
|
||||
debug:
|
||||
msg: "{{ nginx_error_log.stdout_lines }}"
|
||||
Reference in New Issue
Block a user