forked from suliang/Yaf-Blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vhost.conf
executable file
·36 lines (33 loc) · 872 Bytes
/
vhost.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
server
{
listen 80;
server_name www.programcat.com programcat.com;
index index.html index.htm index.php default.html default.htm default.php;
root /yourdir;
error_log /yourdir/programcat.error.log;
#include none.conf;
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
if (!-e $request_filename) {
rewrite ^/(.*) /index.php?$1 last;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 14h;
}
location =/conf/application.ini{
return 404;
}
access_log /yourdir/www.programcat.com.log access;
}