autoconf-2.62 Automatically configure source code on many Un*x platforms
autoconf-wrapper-20071109 Wrapper script for GNU autoconf
e2fsprogs-libuuid-1.41.3_1 UUID library from e2fsprogs package
freetype2-2.3.7 A free and portable TrueType font rendering engine
gettext-0.17_1 GNU gettext package
gmake-3.81_3 GNU version of 'make' utility
jpeg-6b_7 IJG's jpeg compression utilities
kbproto-1.0.3 KB extension headers
libICE-1.0.4_1,1 Inter Client Exchange library for X11
libSM-1.1.0,1 Session Management library for X11
libX11-1.1.99.2,1 X11 library
libXau-1.0.4 Authentication Protocol library for X11
libXaw-1.0.5_1,1 X Athena Widgets library
libXdmcp-1.0.2_1 X Display Manager Control Protocol library
libXext-1.0.4,1 X11 Extension library
libXmu-1.0.4,1 X Miscellaneous Utilities libraries
libXp-1.0.0,1 X print library
libXpm-3.5.7 X Pixmap library
libXt-1.0.5_1 X Toolkit library
libiconv-1.11_1 A character set conversion library
libltdl-1.5.26 System independent dlopen wrapper
libmcrypt-2.5.8 Multi-cipher cryptographic library (used in PHP)
libpthread-stubs-0.1 This library provides weak aliases for pthread functions
libxcb-1.1.93 The X protocol C-language Binding (XCB) library
libxml2-2.7.2_1 XML parser library for GNOME
m4-1.4.11,1 GNU m4
mysql-client-5.0.75 Multithreaded SQL database (client)
mysql-server-5.0.75 Multithreaded SQL database (server)
nginx-0.6.35 Robust and small WWW server
pcre-7.8 Perl Compatible Regular Expressions library
perl-5.8.9 Practical Extraction and Report Language
php5-5.2.8 PHP Scripting Language
php5-bz2-5.2.8 The bz2 shared extension for php
php5-ctype-5.2.8 The ctype shared extension for php
php5-dom-5.2.8 The dom shared extension for php
php5-exif-5.2.8 The exif shared extension for php
php5-fpm-5.2.8 PHP Scripting Language with FastCGI Process Manager
php5-gd-5.2.8 The gd shared extension for php
php5-mbstring-5.2.8 The mbstring shared extension for php
php5-mcrypt-5.2.8 The mcrypt shared extension for php
php5-mysql-5.2.8 The mysql shared extension for php
php5-openssl-5.2.8 The openssl shared extension for php
php5-session-5.2.8 The session shared extension for php
php5-simplexml-5.2.8 The simplexml shared extension for php
php5-spl-5.2.8 The spl shared extension for php
php5-xml-5.2.8 The xml shared extension for php
php5-xmlreader-5.2.8 The xmlreader shared extension for php
php5-zlib-5.2.8 The zlib shared extension for php
phpMyAdmin-3.1.2 A set of PHP-scripts to manage MySQL over the web
pkg-config-0.23_1 A utility to retrieve information about installed libraries
png-1.2.34 Library for manipulating PNG images
printproto-1.0.4 Print extension headers
python25-2.5.2_3 An interpreted object-oriented programming language
t1lib-5.1.2_1,1 A Type 1 Rasterizer Library for UNIX/X11
xcb-proto-1.3 The X protocol C-language Binding (XCB) protocol
xextproto-7.0.4 XExt extension headers
xproto-7.0.14 X11 protocol headers
setenv PACKAGESROOT ftp://ftp.freebsdchina.org
pkg_add -r libxml2 gmake autoconf262
pkg_add -r nginx
pkg_add -r php5-bz2 php5-dom php5-exif php5-gd php5-session php5-simplexml php5-spl php5-xml php5-xmlreader php5-zlib
ee /usr/share/examples/cvsup/ports-supfile
*default host=cvsup5.cn.FreeBSD.org
#ports-all
ports-base
ports-devel
csup /usr/share/examples/cvsup/ports-supfile
cannot install: unknown AUTOCONF version: 262
tar -xzvPf autoconf262.tar -C /usr/ports/devel/
gupzip php-5.2.8-fpm-0.5.10.tar.gz
tar -xvf php-5.2.8-fpm-0.5.10.tar.diff
php5-fpm
rm -rf /usr/ports/lang/php5
cp -r php5-fpm /usr/ports/lang/php5
cd ~ && mkdir -p /usr/ports/lang && tar -xvf php-5.2.8-fpm-0.5.10.tar.gz -C /usr/ports/lang/
cd /usr/ports/lang/php5-fpm&&make install clean
pkg_add -r mysql50-server
pkg_add -r phpMyAdmin
cp /usr/local/share/mysql/my-medium.cnf /var/db/mysql/my.cnf&&ee /var/db/mysql/my.cnf
/usr/local/bin/mysql_install_db
chown -R mysql:mysql /var/db/mysql
/usr/local/etc/rc.d/mysql-server forcestart
/usr/local/bin/mysqladmin -u root password "abcd"
/usr/local/etc/php-fpm.conf
Unix user of processes
<value name="user">www</value>
Unix group of processes
<value name="group">www</value>
cp /usr/local/etc/php.ini-recommended /usr/local/etc/php.ini
ee /usr/local/etc/nginx/nginx.conf
mysql_enable="yes"
php_fpm_enable="yes"
nginx_enable="yes"
location
syntax: location [=|~|~*|^~] /uri/ { ... }
default: no
context: server
This directive allows different configurations depending on the URI. It can be configured using both conventional strings and regular expressions. To use regular expressions, you must use the prefix ~* for case insensitive match and ~ for case sensitive match.
To determine which location directive matches a particular query, the conventional strings are checked first. Conventional strings match the beginning portion of the query and are case-sensitive - the most specific match will be used (see below on how nginx determines this). Afterwards, regular expressions are checked in the order defined in the configuration file. The first regular expression to match the query will stop the search. If no regular expression matches are found, the result from the convention string search is used.
There are two ways to modify this behavior. The first is to use the prefix "=", which matches an exact query only. If the query matches, then searching stops and the request is handled immediately. For example, if the request "/" occurs frequently, then using "location = /" will expedite the processing of this request.
The second is to use the prefix ^~. This prefix is used with a conventional string and tells nginx to not check regular expressions if the path provided is a match. For instance, "location ^~ /images/" would halt searching if the query begins with /images/ - all regular expression directives would not be checked.
Furthermore it is important to know that NGINX does the comparison not URL encoded, so if you have a URL like "/images/%20/test" then use "/images/ /test" to determine the location.
To summarize, the order in which directives are checked is as follows:
1. Directives with the = prefix that match the query exactly. If found, searching stops.
2. All remaining directives with conventional strings, longest match first. If this match used the ^~ prefix, searching stops.
3. Regular expressions, in order of definition in the configuration file.
4. If #3 yielded a match, that result is used. Else the match from #2 is used.
Example:
location = / {
# matches the query / only.
[ configuration A ]
}
location / {
# matches any query, since all queries begin with /, but regular
# expressions and any longer conventional blocks will be
# matched first.
[ configuration B ]
}
location ^~ /images/ {
# matches any query beginning with /images/ and halts searching,
# so regular expressions will not be checked.
[ configuration C ]
}
location ~* \.(gif|jpg|jpeg)$ {
# matches any request ending in gif, jpg, or jpeg. However, all
# requests to the /images/ directory will be handled by
# Configuration C.
[ configuration D ]
}
Example requests:
*
/ -> configuration A
*
/documents/document.html -> configuration B
*
/images/1.gif -> configuration C
*
/documents/1.jpg -> configuration D
Note that you could define these 4 configurations in any order and the results would remain the same.
How nginx Determines Which Path Matches
Most users will not need to know how nginx internally determines which path to use - know that it will choose the "most specific" match for your URL in a speedy and efficient manner. For those that are curious, however, read on.
All path strings are sorted alphabetically. nginx then proceeds to search down the list looking for matches until the request URI has a "higher" value then the current string in the sorted list. This is determined using the family of strcmp() functions - once strcmp() returns 1, then searching stops. Once searching stops, the last string which matched is used.
For example, lets say we have the following paths:
/
/a
/apple
/banana
Now, lets say the server gets the path "/az". nginx would begin search down this list. First, "/" would match, but "/ is less than "/az" so searching continues. "/a" also matches, but "/a" is still less than "/az" so we continue again. "/apple" does not match. The next string, "/banana", is greater than "/az" so searching stops and the last match, "/a", would be used.
原帖由 andsky 于 2009-3-5 14:06 发表
webbench -c 2000 -t 60 http://xxx/iProber.php 所有的 php 页面就已经打不开了, 系统load 都几十了![]()
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |