[cc lang="text"] ab -c 50 -n 3000 -C PHPSESSID=we21f3a362ea79f82076c9c79b8109 -p tmp.txt -T application/x-www-form-urlencoded http://localhost/jczq/projectgg/index[/cc]
tmp.txt格式
[cc lang="text"]codes=146|3/147|3/141|3/148|3/145|3/143|3&totalmoney=2&zhushu=1&beishu=1&playid=spf&pass_type=6_1[/cc]
Showing posts with label apache. Show all posts
Showing posts with label apache. Show all posts
Wednesday, February 23, 2011
Friday, October 29, 2010
基于Nginx, lighttpd/apache上的OpenX高性能集群配置
本文英文原文地址:http://www.sherin.co.in/openxcluster121/
编者注:本文非常详细的描述了OpenX集群的配置方法,对于想通过OpenX做大规模服务的应用来说应该有比较大的帮助。原文是英文的,为了保证意思的表达就不翻译成中文了。
编者注:本文非常详细的描述了OpenX集群的配置方法,对于想通过OpenX做大规模服务的应用来说应该有比较大的帮助。原文是英文的,为了保证意思的表达就不翻译成中文了。
Thursday, August 12, 2010
CACHE CONTROL WITH HTACCESS
[cc lang="apache"]
# Cache Control with .htaccess EXPIRES BY TYPE
# from http://forum.powweb.com/showthread.php?t=62786
### turn on the Expires engine
ExpiresActive On
### expires after a month in the client's cache
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/x-icon A2592000
ExpiresByType application/pdf A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType text/plain A2592000
### expires after 4.8 hours
ExpiresByType text/css A17200
# Please note that the "A" before the numbers above stands for Access.
# This means that the stopwatch starts when a client accesses the file.
# You can also use "M" for modified.
# TIME CHEAT SHEET
# 300 5 MIN
# 600 10 MIN
# 900 15 MIN
# 1800 30 MIN
# 2700 45 MIN
#
# 3600 1 HR
# 7200 2 HR
# 10800 3 HR
# 14400 4 HR
# 18000 5 HR
# 36000 10 HR
# 39600 11 HR
# 43200 12 HR
# 46800 13 HR
# 50400 14 HR
# 54000 15 HR
# 86400 24 HR
#
# 86400 1 DAY
# 172800 2 DAY
# 259200 3 DAY
# 345600 4 DAY
# 432000 5 DAY
# 518400 6 DAY
# 604800 7 DAY
#
# 604800 1 WEEK
# 1209600 2 WEEK
# 1814400 3 WEEK
# 2419200 4 WEEK
#
# 2419200 1 MONTH (FEBRUARY)
# 2505600 1 MONTH (FEBRUARY LEAP YEAR)
# 2592000 1 MONTH (APRIL, JUNE, SEPTEMBER, NOVEMBER)
# 2678400 1 MONTH (JANUARY, MARCH, MAY, JULY, AUGUST, OCTOBER, DECEMBER)
# 31536000 12 MONTH[/cc]
[cc lang="apache"]
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
[/cc]
# Cache Control with .htaccess EXPIRES BY TYPE
# from http://forum.powweb.com/showthread.php?t=62786
### turn on the Expires engine
ExpiresActive On
### expires after a month in the client's cache
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/x-icon A2592000
ExpiresByType application/pdf A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType text/plain A2592000
### expires after 4.8 hours
ExpiresByType text/css A17200
# Please note that the "A" before the numbers above stands for Access.
# This means that the stopwatch starts when a client accesses the file.
# You can also use "M" for modified.
# TIME CHEAT SHEET
# 300 5 MIN
# 600 10 MIN
# 900 15 MIN
# 1800 30 MIN
# 2700 45 MIN
#
# 3600 1 HR
# 7200 2 HR
# 10800 3 HR
# 14400 4 HR
# 18000 5 HR
# 36000 10 HR
# 39600 11 HR
# 43200 12 HR
# 46800 13 HR
# 50400 14 HR
# 54000 15 HR
# 86400 24 HR
#
# 86400 1 DAY
# 172800 2 DAY
# 259200 3 DAY
# 345600 4 DAY
# 432000 5 DAY
# 518400 6 DAY
# 604800 7 DAY
#
# 604800 1 WEEK
# 1209600 2 WEEK
# 1814400 3 WEEK
# 2419200 4 WEEK
#
# 2419200 1 MONTH (FEBRUARY)
# 2505600 1 MONTH (FEBRUARY LEAP YEAR)
# 2592000 1 MONTH (APRIL, JUNE, SEPTEMBER, NOVEMBER)
# 2678400 1 MONTH (JANUARY, MARCH, MAY, JULY, AUGUST, OCTOBER, DECEMBER)
# 31536000 12 MONTH[/cc]
[cc lang="apache"]
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
Monday, June 7, 2010
永久转向
[cc lang='apache' line_numbers='false']
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*) http://fred.oracle1.com/$1 [R=301,L][/cc]
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*) http://fred.oracle1.com/$1 [R=301,L][/cc]
Wednesday, September 23, 2009
Windows 上 Apache Webdav 问题
配置好了webdav,可以删除,可以覆盖,不能上传、建新目录。再这里找到的答案,原来是由于 mod_rewrite 引起的。如果你的目录下有 .htaccess 规则,在dav的location下加上 RewriteEngine off 来屏蔽掉。
Saturday, July 21, 2007
A good win32 apache module binary download site
I found a very good win32 apache module binary download site, English site. You can download many binary module there. such as:
and this site is very cool for apache users! ;)
- mod_perl
- mod_fcgid
- mod_macro
and this site is very cool for apache users! ;)
Monday, January 1, 2007
Apache 2.2.3 PHP 5.2.0 Mysql 4.1 Install
以 apache handler 和 fastcgi 两种方式安装 PHP 5.2.0, 并使用 --with-mysql 和 --with-mysqli 两种方式连接 Mysql 数据库
- 配置 PHP 安装
'./configure' '--codefix=/opt/php5' '--with-apxs2=/opt/bin/apxs' '--enable-fastcgi' '--with-mysql=/usr/local/mysql' '--enable-calendar' '--enable-force-cgi-redirect' '--with-configure-file-path=/opt/php5/cgi' '--enable-trans-sid' '--with-gd' '--with-xml' '--with-ttf=/usr' '--with-freetype-dir=/usr' '--enable-exif' '--with-dom-xslt=/usr' '--with-jpeg-dir=/usr/local/jpeg6b' '--with-png-dir=/usr' '--with-zlib-dir=/usr' '--enable-ftp' '--with-curl=/usr' '--enable-mbstring' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-openssl=/usr' '--with-gettext' '--enable-sockets' '--enable-memory-limit' '--with-xmlrpc' '--enable-debug=no' '--enable-track-vars' '--with-iconv' '--enable-sqlite-utf8' '--with-pgsql=/opt/postgresql' - 这里我还安装了 Postgresql 所以使用了 '--with-pgsql=/opt/postgresql' ,不过奇怪的是 如果我使用
--with-pdo-mysql --with-pdo-pgsql就会出现配置安装的错误。 - 同时使用 mysql 和 mysqli 在 make 的时候可能会出现很多警告,在 MAKEFILE 文件中找到以 EXTRA_LIBS 开始的行,删除第二个 -lmysqlclient_r
Friday, November 10, 2006
使用rewrite实现永久重定向
blogit.3322.org在DreamHost上不能使用,怎么办?使用301永久重定向吧,找个可以使用rewrite的空间,把blogit.3322.org指向那里(保持fred.oracle1.com和blogit.3322.org相同的目录结构),在根目录下.htaccess写入下面内容,这样如果有人从搜索引擎比如Google访问
http://blogit.3322.org/weblog/2006/11/10/dreamhost-now/那就会自动重定向到http://fred.oracle1.com/weblog/2006/11/10/dreamhost-now/Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*) http://fred.oracle1.com/$1 [R=301,L]相关资料
301 redirect: 301代表永久性转移(Permanently Moved),301重定向是网页更改地址后对搜索引擎友好的最好方法,只要不是暂时搬移的情况,都建议使用301来做转址。
302 redirect: 302代表暂时性转移(Temporarily Moved ),在前些年,不少Black Hat SEO曾广泛应用这项技术作弊,目前,各大主要搜索引擎均加强了打击力度,象Google前些年对Business.com以及近来对BMW德国网站的惩罚。即使网站客观上不是spam,也很容易被搜寻引擎容易误判为spam而遭到惩罚。
meta fresh: 这在2000年前比较流行,不过现在已很少见。其具体是通过网页中的meta指令,在特定时间后重定向到新的网页,如果延迟的时间太短(约5秒之內),会被判断为spam。
Saturday, October 21, 2006
Apache 2.2 Vhost configure
Build Vhost in "extra/httpd-vhosts.conf"
Let test the config file!
NameVirtualhost localhost
ServerAdmin root@localhost
DocumentRoot "/opt/httpd/htdocs"
# NameVirtualhost sqladmin.localhost
ServerAdmin webmaster@sqladmin.localhost
DocumentRoot "/opt/www/sqladmin"
ServerPath "/opt/www/sqladmin"
ServerName sqladmin.localhost
# ServerAlias sqladmin.localhost
Options Indexes FollowSymLinks MultiViews
IndexOptions FancyIndexing
AllowOverride None
DirectoryIndex index.php
Order Deny,allow
Allow from all
ErrorLog logs/sqladmin.localhost-error
#
# NameVirtualhost php.localhost
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot /opt/www/php
ServerPath /opt/www/php
Options Indexes FollowSymLinks MultiViews
AllowOverride None
DirectoryIndex /phpinfo.php
Order Deny,allow
Allow from all
ServerName php.localhost
ErrorLog logs/php-error_log
CustomLog logs/php-access_log common
Let test the config file!
fred@localhost:php$ sudo /opt/httpd/bin/httpd -S
VirtualHost configuration:
127.0.0.1:80 is a NameVirtualHost
default server localhost (/opt/httpd/conf/extra/httpd-vhosts.conf:29)
port 80 namevhost localhost (/opt/httpd/conf/extra/httpd-vhosts.conf:29)
port 80 namevhost sqladmin.localhost (/opt/httpd/conf/extra/httpd-vhosts.conf:35)
port 80 namevhost php.localhost (/opt/httpd/conf/extra/httpd-vhosts.conf:53)
Syntax OK
Thursday, August 17, 2006
Perl script on cgiwrap
If I use some script like this
It will give me error :
And I must do like this:
#!/usr/bin/perl
print "Hello World!";
It will give me error :
[Wed Aug 16 08:57:50 2006] [error] [client 222.209.97.197] malformed header from script. Bad header=Hello World...: /www/cgiwrap/cgi/cgiwrapAnd I must do like this:
#!/usr/bin/perl
use CGI qw(:standard);
print header('Welcome to my home page!');
print start_html(), "Linux and PHP", end_html();
Friday, August 11, 2006
虚拟主机流量控制
Subscribe to:
Posts (Atom)