-
Notifications
You must be signed in to change notification settings - Fork 0
/
ossn.conf
73 lines (66 loc) · 2.13 KB
/
ossn.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
61
62
63
64
65
66
67
68
69
70
71
72
73
server {
listen 80;
server_name nginx.localhosts.pro;
root /var/www/html/;
index index.php index.html;
fastcgi_index index.php;
client_max_body_size 50M;
client_body_buffer_size 256K;
location = /rewrite.php {
rewrite ^(.*)$ /installation/tests/apache_rewrite.php;
}
location /action {
rewrite ^/action\/([A-Za-z0-9\_\-\/]+)$ /system/handlers/actions.php?action=$1&$query_string;
}
location / {
if (!-e $request_filename){
rewrite ^/([A-Za-z0-9\_\-]+)$ /index.php?h=$1;
}
if (!-e $request_filename){
rewrite ^/([A-Za-z0-9\_\-]+)\/(.*)$ /index.php?h=$1&p=$2;
}
}
location /error_log {
deny all;
}
location ~ (nginx|htaccess).dist {
deny all;
}
location ~ (^\.|/\.) {
return 403;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 50M;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
expires max;
}
gzip on;
gzip_types
text/css
text/html
text/javascript
text/xml
application/json
application/xml
application/rss+xml
text/plain
text/x-component
application/javascript
application/x-javascript
application/vnd.ms-fontobject
image/svg+xml;
}