-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMagento2
147 lines (145 loc) · 5.08 KB
/
Magento2
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
php-------------------------------------------------------------------------------------------------------------------------------------------------------------
opcache.max_accelerated_files=100000
opcache.revalidate_freq=0
opcache.memory_consumption=128
opcache.fast_shutdown=1
opcache.force_restart_timeout=60
opcache.file_update_protection=10
max_input_vars=10000
pcre.jit=0
date.timezone=Europe/Kiev
session.gc_probability=1
memory_limit=756M
max_execution_time=600
session.auto_start=off
uhosin.session.cryptua=off
php-------------------------------------------------------------------------------------------------------------------------------------------------------------
nginx-------------------------------------------------------------------------------------------------------------------------------------------------------------
charset UTF-8;
location ^~ /setup/pub/ { add_header X-Frame-Options "SAMEORIGIN"; }
location ^~ /setup
root {DOCROOT};
location ~ ^/setup/index.php {
include /etc/nginx/fastcgi_params;
{FASTCGIPASS}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
}
location ~ ^/setup/(?!pub/). { internal; }
}
location ^~ /update/pub/ { add_header X-Frame-Options "SAMEORIGIN"; }
location ^~ /update {
root {DOCROOT};
location ~ ^/update/index.php {
try_files $fastcgi_script_name /index.php$is_args$args;
include /etc/nginx/fastcgi_params;
{FASTCGIPASS}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_split_path_info ^(/update/index.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
location ~ ^/update/(?!pub/). { internal; }
}
location / {
root {DOCROOT}pub;
try_files $uri $uri/ /index.php$is_args$args;
}
location ^~ /pub/ {
location ~ ^/pub/media/(downloadable|customer|import|custom_options|theme_customization/.*\.xml) { internal; }
alias {DOCROOT}pub/;
add_header X-Frame-Options "SAMEORIGIN";
}
location /static/ {
root {DOCROOT}pub;
location ~ ^/static/version\d*/(.*)$ { try_files $uri /static/$1$is_args$args; }
location ~* \.(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2|html|json|webmanifest)$ {
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
location ~ ^/static/(version\d*/)?(.*)$ { try_files $uri /static.php?resource=$2$is_args$args; }
}
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
add_header X-Frame-Options "SAMEORIGIN";
expires off;
location ~ ^/static/(version\d*/)?(.*)$ { try_files $uri /static.php?resource=$2$is_args$args; }
}
location ~ ^/static/(version\d*/)?(.*)$ { try_files $uri /static.php?resource=$2$is_args$args; }
add_header X-Frame-Options "SAMEORIGIN";
}
location ^~ /media/customer/ { internal; }
location ^~ /media/downloadable/ { internal; }
location ^~ /media/import/ { internal; }
location ^~ /media/custom_options/ { internal; }
location ^~ /media/ {
root {DOCROOT}pub;
try_files $uri $uri/ /get.php$is_args$args;
location ~ ^/media/theme_customization/.*\.xml { internal; }
location ~* \.(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
try_files $uri $uri/ /get.php$is_args$args;
}
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
add_header X-Frame-Options "SAMEORIGIN";
expires off;
try_files $uri $uri/ /get.php$is_args$args;
}
add_header X-Frame-Options "SAMEORIGIN";
}
location /errors/ {
location ~* \.xml$ { internal; }
}
location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check)\.php$ {
root {DOCROOT}pub;
include /etc/nginx/fastcgi_params;
{FASTCGIPASS}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
try_files $uri =404;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param PHP_FLAG "session.auto_start=off suhosin.session.cryptua=off";
fastcgi_param PHP_VALUE "memory_limit=756M max_execution_time=18000";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
}
gzip on;
gzip_disable "msie6";
gzip_comp_level 1;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
gzip_types
text/plain
text/css
text/js
text/xml
text/javascript
application/javascript
application/x-javascript
application/json
application/xml
application/xml+rss
image/svg+xml;
gzip_vary on;
location ~* (\.php$|\.phtml$|\.htaccess$|\.git) { internal; }
location @php {
root {DOCROOT}pub;
try_files $uri $uri/ /index.php$is_args$args;
include /etc/nginx/fastcgi_params;
{FASTCGIPASS}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
nginx-------------------------------------------------------------------------------------------------------------------------------------------------------------