新老用户都可能遇到陷阱。下面我们列出频繁出现的问题,以及如何解决。 在 Freenode IRC #nginx 频道,我们经常看到这些问题。
[TOC]
最常见的是有人试图从其他指南拷贝配置片段。并非所有的指南是错误的,但绝大部分是有问题的。
新老用户都可能遇到陷阱。下面我们列出频繁出现的问题,以及如何解决。 在 Freenode IRC #nginx 频道,我们经常看到这些问题。
[TOC]
最常见的是有人试图从其他指南拷贝配置片段。并非所有的指南是错误的,但绝大部分是有问题的。
// Copyright 2011 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// HTTP reverse proxy handler | |
package httputil | |
import ( | |
"io" |
#!/bin/bash | |
# A shell script to delete / drop all tables from MySQL database. | |
# Usage: ./script user password dbnane | |
# Usage: ./script user password dbnane server-ip | |
# Usage: ./script user password dbnane mysql.nixcraft.in | |
# ------------------------------------------------------------------------- | |
# Copyright (c) 2008 nixCraft project <http://www.cyberciti.biz/fb/> | |
# This script is licensed under GNU GPL version 2.0 or above | |
# ------------------------------------------------------------------------- | |
# This script is part of nixCraft shell script collection (NSSC) |
var ( | |
MAX_POOL_SIZE = 20 | |
ch chan *Client | |
) | |
func getPool() *Client { | |
if ch == nil { | |
ch = make(chan *Client, MAX_POOL_SIZE) |
package main | |
import ( | |
"database/sql" | |
"fmt" | |
_ "github.com/denisenkom/go-mssqldb" | |
) | |
func main() { | |
DB, err := sql.Open("mssql", "server=172.16.32.1**;port=1433;user id=sa;password=*****;database=demo;") |
package main | |
import ( | |
"flag" | |
"fmt" | |
"github.com/miekg/dns" | |
"os" | |
) | |
var ( |