nginx_apps.vhost.master 967 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
server {
        listen {apps_vhost_ip}{apps_vhost_port};

        server_name {apps_vhost_servername};

        root   {apps_vhost_dir};

        location / {
               index index.php index.html;
        }

        # serve static files directly
        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
               access_log        off;
        }

        location ~ \.php$ {
18
19
               try_files $uri =404;
               include /etc/nginx/fastcgi_params;
20
21
22
23
               fastcgi_pass 127.0.0.1:{fpm_port};
               fastcgi_index index.php;
               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
               fastcgi_param PATH_INFO $fastcgi_script_name;
24
25
26
27
               fastcgi_buffer_size 128k;
               fastcgi_buffers 256 4k;
               fastcgi_busy_buffers_size 256k;
               fastcgi_temp_file_write_size 256k;
28
29
30
31
32
33
        }

        location ~ /\. {
               deny  all;
        }
}