server listen 80 default_server listen 80 default_server ipv6only on l

 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
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
listen 443 ssl;
server_name tmf.4rc.io;
ssl_certificate /etc/nginx/ssl/tmf.crt;
ssl_certificate_key /etc/nginx/ssl/tmf.key;
location / {
index index.php;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
root /usr/local/zend/tmf/public;
index index.php;
# Make site accessible from http://localhost/
server_name tmf.4rc.io;
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
rewrite '^(.*)\.[\d]{10}\.(css|js)$' $1.$2 last;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param APPLICATION_ENV "staging";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# Block access to .htaccess
location ~ \.htaccess {
deny all;
}
}