Skip to content

Commit 20ef6e1

Browse files
committed
template updates
1 parent 6676855 commit 20ef6e1

File tree

1 file changed

+37
-35
lines changed

1 file changed

+37
-35
lines changed

virtual_host.template

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
server {
2-
server_name www.DOMAIN DOMAIN;
3-
4-
root ROOT;
5-
6-
access_log /var/log/nginx/DOMAIN.access.log;
7-
error_log /var/log/nginx/DOMAIN.error.log
8-
9-
index index.html index.htm;
10-
11-
# serve static files directly
12-
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
13-
access_log off;
14-
expires max;
15-
}
16-
17-
location ~ /\.ht {
18-
deny all;
19-
}
20-
21-
location ~ \.php$ {
22-
root ROOT;
23-
try_files $uri $uri/ /index.php?$args ;
24-
index index.html index.htm index.php;
25-
fastcgi_index index.php;
26-
fastcgi_param PATH_INFO $fastcgi_path_info;
27-
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
28-
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
29-
fastcgi_param APP_ENV dev;
30-
31-
fastcgi_pass unix:/var/run/php5-fpm.sock;
32-
fastcgi_split_path_info ^(.+\.php)(/.+)$;
33-
include fastcgi_params;
34-
}
35-
36-
sendfile off;
2+
listen *:80;
3+
4+
server_name www.DOMAIN DOMAIN;
5+
6+
root ROOT;
7+
8+
access_log /var/log/nginx/DOMAIN.access.log;
9+
error_log /var/log/nginx/DOMAIN.error.log;
10+
11+
index index.html index.htm;
12+
13+
# serve static files directly
14+
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
15+
access_log off;
16+
expires max;
17+
}
18+
19+
location ~ /\.ht {
20+
deny all;
21+
}
22+
23+
location ~ \.php$ {
24+
root ROOT;
25+
try_files $uri $uri/ /index.php?$args ;
26+
index index.html index.htm index.php;
27+
fastcgi_index index.php;
28+
fastcgi_param PATH_INFO $fastcgi_path_info;
29+
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
30+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
31+
fastcgi_param APP_ENV dev;
32+
33+
fastcgi_pass unix:/var/run/php5-fpm.sock;
34+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
35+
include fastcgi_params;
36+
}
37+
38+
sendfile off;
3739
}

0 commit comments

Comments
 (0)