docker

Docker for services
git clone git://git.unixkoans.com/docker.git
Log | Files | Refs

php.conf (1102B)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
server {
    listen 80;
#    server_name {{ domains.php.to }};
#{% if enabled_https %}
#    return 301 https://$host$request_uri;
#}

#server {
#    listen 443 ssl http2;
#    server_name {{ domains.php.to }};

#    ssl_certificate /etc/letsencrypt/live/{{ domains.php.to }}/fullchain.pem;
#    ssl_certificate_key /etc/letsencrypt/live/{{ domains.php.to }}/privkey.pem;
#    include /etc/nginx/ssl_params;
#{% endif %}

    root /var/www/html;

#    access_log /var/log/nginx/{{ domains.php.to }}_access.log;
#    error_log /var/log/nginx/{{ domains.php.to }}_error.log info;

    location / {
        index index.php index.html index.htm;
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
#        try_files $uri = 404;
#{% if ansible_os_family == "Debian" %}
#        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
#{% endif %}
#{% if ansible_distribution == "CentOS" %}
        fastcgi_pass php:9000;
#{% endif %}
        fastcgi_index index.php;
        include /etc/nginx/fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
    }
}