This document has now been incorporated into the uWSGI documentation:
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
Steps with explanations to set up a server using:
原帖地址: http://topic.csdn.net/u/20110113/19/b0d5d506-4307-428b-a61d-7974aa66a2da.html | |
首先要说明的是:这里介绍的方法都是大部分是本人“悟”出来的,所以网上难有流传! | |
好方法不能自己私藏,否则就白忙乎这几天了,分享给有需要的朋友们。如果有转载,敬请注明来自*CSDN老邓*作品。 | |
呵呵,给自己打广告,实在是无耻之极,权当无聊之时打字之用。 | |
欢迎流传,为最优秀的分布式版本管理系统Git做宣传!! | |
步骤: | |
1. 下载:http://loaden.googlecode.com/files/gitconfig.7z | |
2. 解压到:<MsysGit安装目录>/cmd/,例如:D:\Program Files\Git\cmd |
# aliyun apt source | |
# sudo sh -c 'echo "deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted \n\ | |
# deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted \n\ | |
# deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted \n\ | |
# deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted \n\ | |
# deb http://cn.archive.ubuntu.com/ubuntu/ trusty universe \n\ | |
# deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty universe \n\ | |
# deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates universe \n\ | |
# deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates universe \n\ | |
# deb http://cn.archive.ubuntu.com/ubuntu/ trusty multiverse \n\ |
set nocompatible " Don't be compatible with vi | |
let mapleader="," " change the leader to be a comma vs slash | |
command! W :w | |
cmap W! w !sudo tee % >/dev/null | |
map <silent> <leader>V :source ~/.vimrc<CR>:filetype detect<CR>:exe ":echo 'vimrc reloaded'"<CR> |
beautify: (string, indent = 0) -> | |
switch ch = string[0] || '' | |
when '' then "" | |
when '{' or '[' then "#{ch}\n#{Array(++indent+1).join('\t')}#{@beautify(string[1..], indent)}" | |
when '}' or ']' then "\n#{Array(--indent+1).join('\t')}#{ch}#{@beautify(string[1..], indent)}" | |
when ',' then "#{ch}\n#{Array(indent+1).join('\t')}#{@beautify(string[1..], indent)}" | |
when ':' then " : #{@beautify(string[1..], indent)}" | |
else "#{ch}#{@beautify(string[1..], indent)}" |
user nginx; | |
worker_processes 2; | |
worker_rlimit_nofile 32768; | |
error_log /var/log/nginx/error.log; | |
#error_log /var/log/nginx/error.log notice; | |
#error_log /var/log/nginx/error.log info; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 4096; | |
multi_accept on; |
# 规则配置仅供参考,适用于 Surge Mac (1.3.0) 及其后续版本; | |
# 包含 Proxy Group、URL Rewrite 特性; | |
# 包含 Reject 规则,用于拦截广告、行为分析、数据统计; | |
# 屏蔽 Hao123、百度搜索,放行百度地图、百度外卖、百度音乐、百度云盘、百度百科。 | |
# Surge for Mac 简明指南 http://bit.ly/1TATRaG | |
[General] | |
# warning, notify, info, verbose | |
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local | |
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
loglevel = notify |
#!/bin/bash | |
# Slightly modified version from https://raw.githubusercontent.com/Nyr/openvpn-install/master/openvpn-install.sh | |
# Run with sudo ./openvpn-install.sh and not sudo sh ./openvpn-install.sh as read command has issues with external triggering of scripts | |
# OpenVPN road warrior installer for Debian, Ubuntu and CentOS | |
# This script will work on Debian, Ubuntu, CentOS and probably other distros | |
# of the same families, although no support is offered for them. It isn't | |
# bulletproof but it will probably work if you simply want to setup a VPN on | |
# your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and | |
# universal as possible. |
/robots.txt | |
/index.php?a=1%3Cscript%3Ealert(abc)%3C/script%3E | |
/nevercouldexistfilenosec | |
/nevercouldexistfilewebsec | |
/nevercouldexistfilenosec.aspx | |
/nevercouldexistfilewebsec.aspx | |
/nevercouldexistfilenosec.shtml | |
/nevercouldexistfilewebsec.shtml | |
/nevercouldexistfilenosec/ | |
/nevercouldexistfilewebsec/ |