Changeset - a99958de73d9
[Not reviewed]
0 2 0
Branko Majic (branko) - 6 years ago 2020-05-07 16:09:17
branko@majic.rs
MAR-152: Updated the php_website role to use new socket location.
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
roles/php_website/templates/fpm_site.conf.j2
Show inline comments
 
; Start a new named pool.
 
[{{ fqdn }}]
 

	
 
; Set the user and group that should execute the scripts.
 
user = {{ user }}
 
group = {{ user }}
 

	
 
; Listen on a dedicated UNIX socket.
 
listen = /var/run/{{ php_fpm_service_name }}/{{ fqdn }}.sock
 
listen = /run/php/{{ fqdn }}.sock
 

	
 
; Set-up UNIX socket permissions (allow web server to connect).
 
listen.owner = www-data
 
listen.group = www-data
 
listen.mode = 0660
 

	
 
; Configure how processes are managed and how many are launched.
 
pm = dynamic
 
pm.max_children = 5
 
pm.start_servers = 2
 
pm.min_spare_servers = 1
 
pm.max_spare_servers = 3
roles/php_website/templates/nginx_site.j2
Show inline comments
 
@@ -47,25 +47,25 @@ server {
 
    {% if deny_files_regex -%}
 
    # Deny access to user-specified files.
 
    {% for regex in deny_files_regex -%}
 
    location ~ {{ regex }} {
 
        deny all;
 
    }
 
    {% endfor -%}
 
    {% endif %}
 

	
 
    # Interpret PHP files via FastCGI.
 
    location ~ {{ php_file_regex }} {
 
        include snippets/fastcgi-php.conf;
 
        fastcgi_pass unix:/var/run/{{ php_fpm_service_name }}/{{ fqdn }}.sock;
 
        fastcgi_pass unix:/run/php/{{ fqdn }}.sock;
 
    }
 

	
 
    # Serve the files.
 
    location ~ /(.+) {
 
	try_files $uri $uri/{% if php_rewrite_urls %} @php_rewrite{% else %} =404{% endif %};
 
    }
 

	
 
    {% if php_rewrite_urls -%}
 
    # Apply URL rewrites.
 
    location @php_rewrite {
 
    {% for rewrite in php_rewrite_urls %}
 
    rewrite {{ rewrite }};
0 comments (0 inline, 0 general)