分享自己网站的构架 写得比较详细了
32832
- 360安全卫士2012-07-04论坛元老23620
- 本帖最后由 360安全卫士 于 2012-7-4 19:09 编辑 *
移步http://boke.1kapp.com/2012/07/open-web-construction-of-www-fen-mu/
这是新浪云商店的小博,请大牛个手下留情。小弟初来贵地不懂规矩若有得罪请包含。分啊!!人家要分啊!!!你们都不懂加分才有动力么
说我呦呦的,你可以把站打挂了再说话,此处只说安全与性能,谈SEO、喷子些滚粗。
网站轮循域名:自己分析去。。。- C:\Users\Administrator>nslookup
- 默认服务器: google-public-dns-a.google.com
- Address: 8.8.8.8
- - > set type=a
- > www.fen.mu
- 服务器: google-public-dns-a.google.com
- Address: 8.8.8.8
- - 非权威应答:
- 名称: www.fen.mu.g.xgslb.net
- Addresses: 141.101.126.21
- 141.101.126.61
- 141.101.127.11
- 141.101.127.51
- 173.245.48.139
- 173.245.49.11
- 173.245.50.72
- 173.245.51.164
- 173.245.52.129
- 103.22.200.100
- Aliases: www.fen.mu
- - >复制代码NGINX配置范例:
nginx.conf:- user nobody;
- worker_processes 8;
- - pid usr/nginx.pd;
- - worker_rlimit_nofile 20480;
- - events {
- worker_connections 20480;
- use epoll;
- }
- http {
- - - limit_req_zone $http_x_forwarded_for zone=xlimit:10m rate=500r/s;
- limit_req_zone $uri zone=ulimit:10m rate=500r/s;
- limit_req_zone $host zone=hlimit:10m rate=10000r/s;
- - ....复制代码vhost.conf:- server {
- - server_name www.fen.mu;
- listen x.x.x.x:80;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $http_x_forwarded_for;
- - gzip on;
- - index index.html;
- - if (-d $request_filename) {
- - rewrite ^/(.*)([^/])$ $scheme://$host/$1$2/ permanent;
- }
- - include proxy_pass.conf;
- - - location ~* \.(zip|rar|tar|7z|gzip|gz|tgz|bz2|tgz|php|asp|aspx|php|do|dmp|php5|php4|pl|py|cgi|mdb|nsf|dll|dl|torrent|bak|backup|old|log) {
- return 256;
- }
- location ~* (wp-admin|dashboard|control|login|register) {
- return 256;
- }
- - location / {
- - if ( $http_x_forwarded_for = "" ) {
- return 256;
- }
- - limit_req zone=hlimit burst=20000 nodelay;
- limit_req zone=ulimit burst=100 nodelay;
- limit_req zone=xlimit burst=2 nodelay;
- - expires 1s;
- - index index.html;
- - root /home/fenmu/;
- default_type text/html;
- proxy_store on;
- proxy_store_access user:rw group:rw all:rw;
- - if (!-f $request_filename) {
- proxy_pass http://x.x.x.x;
- break;
- }
- - - footer '
- ';
- }
- - - location /serverstatus {
- expires 1s;
- stub_status on;
- }
- - location /favicon.ico {
- rewrite ^ http://s3.fen.mu/fenmustatics/favicon.ico;
- }
- - - }
- 复制代码