modify side nav to call h5 api
Showing
3 changed files
with
62 additions
and
94 deletions
1 | + | ||
2 | +<VirtualHost *:8080> | ||
3 | + ServerAdmin root@localhost | ||
4 | + CustomLog "/Data/logs/apache/access.buy.test.yoho.cn.log" combined | ||
5 | + ErrorLog "/Data/logs/apache/error.buy.test.yoho.cn.log" | ||
6 | + ServerName buy.test.yoho.cn | ||
7 | + DocumentRoot "/Data/code/git/yohobuy/yohobuy/m.yohobuy.com/public" | ||
8 | + RewriteEngine on | ||
9 | + RewriteCond %{REQUEST_FILENAME} !-f | ||
10 | + RewriteCond %{REQUEST_FILENAME} !-d | ||
11 | + RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg|\.svg|\.woff|\.eot|\.ttf)$ | ||
12 | + RewriteRule ^/(.+)$ /index.php [L] | ||
13 | + <Directory /> | ||
14 | + LimitRequestBody 10485760 | ||
15 | + Options FollowSymLinks | ||
16 | + AllowOverride None | ||
17 | + Order allow,deny | ||
18 | + Allow from all | ||
19 | + Require all granted | ||
20 | + </Directory> | ||
21 | +</VirtualHost> | ||
22 | + | ||
23 | +<VirtualHost *:8080> | ||
24 | + ServerAdmin root@localhost | ||
25 | + CustomLog "/Data/logs/apache/access.guang.test.yoho.cn.log" combined | ||
26 | + ErrorLog "/Data/logs/apache/error.guang.test.yoho.cn.log" | ||
27 | + ServerName guang.test.yoho.cn | ||
28 | + DocumentRoot "/Data/code/git/yohobuy/yohobuy/m.yohobuy.com/public" | ||
29 | + RewriteEngine on | ||
30 | + RewriteCond %{REQUEST_FILENAME} !-f | ||
31 | + RewriteCond %{REQUEST_FILENAME} !-d | ||
32 | + RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg|\.svg|\.woff|\.eot|\.ttf)$ | ||
33 | + RewriteCond %{QUERY_STRING} ^(.*)$ | ||
34 | + RewriteRule / /index.php?/guang/list/index&%1 [L] | ||
35 | + RewriteRule ^/(.+)$ /index.php [L] | ||
36 | + <Directory /> | ||
37 | + LimitRequestBody 10485760 | ||
38 | + Options FollowSymLinks | ||
39 | + AllowOverride None | ||
40 | + Order allow,deny | ||
41 | + Allow from all | ||
42 | + Require all granted | ||
43 | + </Directory> | ||
44 | +</VirtualHost> |
1 | server | 1 | server |
2 | { | 2 | { |
3 | listen 80; | 3 | listen 80; |
4 | - server_name yhb.test.yoho.cn *.yhb.test.yoho.cn; | 4 | + server_name buy.test.yoho.cn guang.test.yoho.cn; |
5 | 5 | ||
6 | #access_log /Data/logs/access.buy.test.yoho.cn.log combined; | 6 | #access_log /Data/logs/access.buy.test.yoho.cn.log combined; |
7 | error_log /Data/logs/error.buy.test.yoho.cn.log warn; | 7 | error_log /Data/logs/error.buy.test.yoho.cn.log warn; |
8 | 8 | ||
9 | root /Data/code/git/yohobuy/yohobuy/m.yohobuy.com/public; | 9 | root /Data/code/git/yohobuy/yohobuy/m.yohobuy.com/public; |
10 | 10 | ||
11 | - set $sub ''; | ||
12 | - if ($host ~* ([^\.]+)\.yhb.test.yoho.cn$) { | ||
13 | - set $sub $1; | ||
14 | - } | 11 | + #match ip |
12 | + deny 192.168.1.1; | ||
13 | + allow 218.94.75.50; | ||
14 | + allow 218.94.75.58; | ||
15 | + allow 123.56.138.21; | ||
16 | + deny all; | ||
15 | 17 | ||
16 | location ~* \.html$ { | 18 | location ~* \.html$ { |
17 | root /Data/code/git/yohobuy/assets; | 19 | root /Data/code/git/yohobuy/assets; |
18 | - if (!-f $request_filename){ | ||
19 | - root /Data/code/git/yohobuy/yohobuy/m.yohobuy.com/public; | ||
20 | - rewrite ^/(.+)$ /index.php?$1& last; | 20 | + if (-f $request_filename){ |
21 | + expires 3m; | ||
21 | } | 22 | } |
22 | - expires 7d; | ||
23 | - } | ||
24 | - | ||
25 | - location / { | ||
26 | - index index.php; | ||
27 | - if (!-f $request_filename){ | ||
28 | - rewrite ^/(.+)$ /index.php?$1& last; | ||
29 | - } | ||
30 | } | 23 | } |
31 | 24 | ||
32 | location ~* \.(ico|woff)$ { | 25 | location ~* \.(ico|woff)$ { |
@@ -37,22 +30,21 @@ server | @@ -37,22 +30,21 @@ server | ||
37 | expires 7d; | 30 | expires 7d; |
38 | } | 31 | } |
39 | 32 | ||
40 | - location ~ .*\.php?$ { | ||
41 | - fastcgi_pass 127.0.0.1:9000; | ||
42 | - fastcgi_index index.php; | ||
43 | - #fastcgi_param PATH_INFO $fastcgi_script_name; | ||
44 | - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
45 | - include fastcgi_params; | 33 | + location / { |
34 | + proxy_redirect off; | ||
35 | + proxy_pass http://yohobuy; | ||
36 | + proxy_set_header Host $host; | ||
37 | + proxy_set_header X-Real-IP $remote_addr; | ||
38 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
39 | + proxy_set_header Accept-Encoding "gzip"; | ||
46 | } | 40 | } |
47 | - | ||
48 | - error_page 403 = http://buy.test.yoho.cn; | ||
49 | - error_page 404 = http://buy.test.yoho.cn/error.html; | 41 | + |
50 | } | 42 | } |
51 | 43 | ||
52 | server | 44 | server |
53 | { | 45 | { |
54 | listen 80; | 46 | listen 80; |
55 | - server_name staticyhb.test.yoho.cn; | 47 | + server_name static.buy.test.yoho.cn; |
56 | 48 | ||
57 | #access_log /Data/logs/access.static.buy.test.yoho.cn.log combined; | 49 | #access_log /Data/logs/access.static.buy.test.yoho.cn.log combined; |
58 | #error_log /Data/logs/error.static.buy.test.yoho.cn.log warn; | 50 | #error_log /Data/logs/error.static.buy.test.yoho.cn.log warn; |
1 | -server | ||
2 | -{ | ||
3 | - listen 80; | ||
4 | - server_name wap.yohobuy.com; | ||
5 | - | ||
6 | - #access_log /Data/logs/access.wap.yohobuy.com.log combined; | ||
7 | - error_log /Data/logs/error.wap.yohobuy.com.log warn; | ||
8 | - | ||
9 | - root /Data/PE/yohobuy/yohobuy/m.yohobuy.com/public; | ||
10 | - | ||
11 | - location ~* \.html$ { | ||
12 | - root /Data/PE/yohobuy/assets; | ||
13 | - if (!-f $request_filename){ | ||
14 | - root /Data/PE/yohobuy/yohobuy/m.yohobuy.com/public; | ||
15 | - rewrite ^/(.+)$ /index.php?$1& last; | ||
16 | - } | ||
17 | - expires 7d; | ||
18 | - } | ||
19 | - | ||
20 | - location / { | ||
21 | - index index.php; | ||
22 | - if (!-f $request_filename){ | ||
23 | - rewrite ^/(.+)$ /index.php?$1& last; | ||
24 | - } | ||
25 | - } | ||
26 | - | ||
27 | - location ~* \.(ico|woff)$ { | ||
28 | - expires 7d; | ||
29 | - } | ||
30 | - | ||
31 | - location = /crossdomain.xml { | ||
32 | - expires 7d; | ||
33 | - } | ||
34 | - | ||
35 | - location ~ .*\.php?$ { | ||
36 | - fastcgi_pass 127.0.0.1:9000; | ||
37 | - fastcgi_index index.php; | ||
38 | - #fastcgi_param PATH_INFO $fastcgi_script_name; | ||
39 | - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
40 | - include fastcgi_params; | ||
41 | - } | ||
42 | - | ||
43 | - error_page 403 = http://wap.yohobuy.com; | ||
44 | - error_page 404 = http://wap.yohobuy.com/error.html; | ||
45 | -} | ||
46 | - | ||
47 | -server | ||
48 | -{ | ||
49 | - listen 80; | ||
50 | - server_name static.wap.yohobuy.com; | ||
51 | - | ||
52 | - #access_log /Data/logs/access.static.wap.yohobuy.com.log combined; | ||
53 | - #error_log /Data/logs/error.static.wap.yohobuy.com.log warn; | ||
54 | - | ||
55 | - root /Data/PE/yohobuy/static; | ||
56 | - | ||
57 | - location / { | ||
58 | - log_not_found off; | ||
59 | - access_log off; | ||
60 | - expires 30d; | ||
61 | - } | ||
62 | - | ||
63 | - location ~* \.(svg|eot|ttf|woff|otf)$ { | ||
64 | - add_header Access-Control-Allow-Origin *; | ||
65 | - expires 30d; | ||
66 | - } | ||
67 | - | ||
68 | -} |
-
Please register or login to post a comment