-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnginx-site.conf
41 lines (31 loc) · 1.08 KB
/
nginx-site.conf
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
40
41
server {
listen 80;
server_name localhost;
root /app/public.built;
index index.html index.htm index.php;
access_log /var/log/nginx/app.access.log;
error_log /var/log/nginx/app.access.log;
charset utf-8;
location / {
root /app/public.built;
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't break when using query string
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php {
root /app/public.built;
fastcgi_pass 127.0.0.1:9000;
# or if you used a unix socket
# fastcgi_pass unix:/var/run/hhvm/sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
error_page 404 /index.php;
# Deny .htaccess file access
location ~ /\.ht {
deny all;
}
}