forked from davibe/gitlist-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
60 lines (49 loc) · 1.38 KB
/
nginx.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
user www-data;
daemon off;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
types_hash_max_size 2048;
server_names_hash_bucket_size 64;
server {
listen 80;
access_log /var/log/nginx/MYSERVER.access.log combined;
error_log /var/log/nginx/MYSERVER.error.log error;
root /var/www/gitlist;
index index.php;
# auth_basic "Restricted";
# auth_basic_user_file .htpasswd;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~* ^/index.php.*$ {
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# if you're using php5-fpm via tcp
# fastcgi_pass 127.0.0.1:9000;
# if you're using php5-fpm via socket
fastcgi_pass unix:/var/run/php5-fpm.sock;
include /etc/nginx/fastcgi_params;
}
location / {
try_files $uri @gitlist;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
add_header Vary "Accept-Encoding";
expires max;
try_files $uri @gitlist;
tcp_nodelay off;
tcp_nopush on;
}
# location ~* \.(git|svn|patch|htaccess|log|route|plist|inc|json|pl|po|sh|ini|sample|kdev4)$ {
# deny all;
# }
location @gitlist {
rewrite ^/.*$ /index.php;
}
}
}