diff --git a/roles/typo3-cms/meta/main.yml b/roles/typo3-cms/meta/main.yml new file mode 100644 index 0000000..c808c92 --- /dev/null +++ b/roles/typo3-cms/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - global-handlers diff --git a/roles/typo3-cms/tasks/main.yaml b/roles/typo3-cms/tasks/main.yaml index 9952c1c..c6b6b50 100644 --- a/roles/typo3-cms/tasks/main.yaml +++ b/roles/typo3-cms/tasks/main.yaml @@ -73,13 +73,14 @@ 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 = .*$ - line: listen = 0.0.0.0:9000 + regex: ^listen\.allowed_clients = .*$ + line: listen.allowed_clients = 127.0.0.1 notify: restart php-fpm - name: Configure php-fpm listen allowed clients diff --git a/roles/typo3-cms/templates/default-nginx.conf b/roles/typo3-cms/templates/default-nginx.conf index c1a482e..e053d75 100644 --- a/roles/typo3-cms/templates/default-nginx.conf +++ b/roles/typo3-cms/templates/default-nginx.conf @@ -1,7 +1,13 @@ +#log_format scripts '$fastcgi_path_info $document_root$fastcgi_script_name > $request'; + server { + #access_log /var/log/nginx/scripts.log scripts; + + include fastcgi.conf; + include fastcgi_params; listen 8080; index index.php index.html; - root /var/www/html/public; + root /var/www/atlantishq-cms/public/; location ~ \.php$ { try_files $uri =404; @@ -9,8 +15,9 @@ server { 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; - add_header X-ATHQ-HANDLER cms; + #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param SCRIPT_FILENAME /var/www/atlantishq-cms/public/index.php; + #fastcgi_param PATH_INFO $fastcgi_path_info; + add_header X-ATHQ-HANDLER cms always; } }