-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.com
More file actions
executable file
·59 lines (43 loc) · 1.05 KB
/
Copy pathexample.com
File metadata and controls
executable file
·59 lines (43 loc) · 1.05 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
server {
listen 80; # listen also for IPv4 traffic on "regular" IPv4 sockets
server_name "example.com";
access_log /var/log/nginx/$host.access.log;
error_log /var/log/nginx/error.log;
root /var/www/example/public;
index index.php index.html;
location ~ /\. {
deny all;
}
## Favicon Not Found
access_log off;
log_not_found off;
}
## Robots.txt Not Found
location = /robots.txt {
access_log off;
log_not_found off;
}
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
include /etc/nginx/fastcgi.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
#for subdomains on a SparkyCMS install
server {
listen 80;
server_name ~^(?<domain>.+)\.example\.com$;
root /var/www/$domain/public;
index index.php;
#access_log /var/log/domains/$domain.access.log;
#error_log /var/log/domains/$domain.access.log;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
include /etc/nginx/fastcgi.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}