forked from Alanaktion/phproject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-example.conf
51 lines (40 loc) · 906 Bytes
/
nginx-example.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
server {
listen 80;
#listen 443 ssl;
#ssl_certificate /etc/nginx/ssl/phproject.crt;
#ssl_certificate_key /etc/nginx/ssl/phproject.key;
root /var/www/phproject;
index index.php;
server_name demo.phproject.org;
# Dynamic URLs
location / {
try_files $uri $uri/ /index.php?$args;
}
# Disable logging of ping requests
location /ping {
access_log off;
try_files $uri $uri/ /index.php?$args;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ ^/app/(controller|dict|helper|model|view) {
deny all;
}
location ~ /\.ht {
deny all;
}
location ~ /config\.ini {
deny all;
}
client_max_body_size 64M;
}