-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmagento.conf
78 lines (65 loc) · 1.39 KB
/
magento.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
74
75
76
77
78
server {
listen 80;
server_name site.com;
root /var/www/magento;
fastcgi_read_timeout 1200;
fastcgi_connect_timeout 1200;
access_log /var/log/nginx/magento.log main;
error_log /var/log/nginx/magento.log;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ @handler;
# expires 30d;
}
location /media/js/ {
gzip on;
gzip_min_length 1000;
gzip_disable "MSIE [1-6]\.";
expires 5d;
access_log off;
}
location /media/css/ {
gzip on;
gzip_min_length 1000;
gzip_disable "MSIE [1-6]\.";
expires 5d;
access_log off;
}
location /media/catalog/ {
access_log off;
}
location /js/ {
access_log off;
}
location /skin/ {
access_log off;
}
location /images/ {
access_log off;
}
location /app/ { deny all; }
location /includes/ { deny all; }
location /lib/ { deny all; }
location /media/downloadable/ { deny all; }
location /pkginfo/ { deny all; }
location /report/config.xml { deny all; }
location /var/ { deny all; }
location ~ /\.ht {
deny all;
}
location @handler {
rewrite / /index.php;
}
location ~ .php/ {
rewrite ^(.*.php)/ $1 last;
}
location ~ \.php$ {
gzip on;
gzip_min_length 1000;
gzip_disable "MSIE [1-6]\.";
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/magento$fastcgi_script_name;
include fastcgi_params;
}
}