20世纪90年代在人类文明史上重要的一个产物
也许在今后的N个世纪中我们无法脱离它
默认的apache日志模块只会对web日志输出到一个文件中,而不会根据日期和虚拟主机等进行归档,这不是一个全面的web服务器应该做的。所以Apache中我们引入Cronolog程序对日志进行归档,按日输出日志。

安装Cronolog:
cd /usr/ports/sysutils/cronolog
make install clean

与Apache集成,修改httpd.conf(或虚拟主机文件httpd-vhosts.conf),搜索customlog,设置为
CustomLog "|/usr/local/sbin/cronolog /var/log/www/%Y%m/%d_access_log" combined

重启apache即可
标准执行命令应是:
/usr/local/etc/rc.d/apache22 restart
Tags: ,

微软的@w.cn和@9.cn邮箱

[ 2007/12/16 16:45 | by Johnny.He ]
微软的@w.cn和@9.cn邮箱(抢注中)全世界最短的邮箱

@w.cn的申请地址:

https://domains.live.com/members/signup.aspx?domain=w.cn

@9.cn的申请地址:

https://domains.live.com/members/signup.aspx?domain=9.cn

9.cn  w.cn是由 Windows Live Mail 授权的提供电子邮件服务的组织。  

5G免费空间,测试4位的帐号可以申请!!!
如果需要把 aaa.com bbb.com ccc.com全部指向/usr/local/www下,就在/usr/local/etc/apache22/extra/httpd-vhosts.conf中设置虚拟机的地方添加一条
ServerAlias aaa.com bbb.com ccc.com

范例如下:
<VirtualHost ***.***.***.**:80>
    ServerAdmin Johnny.He#Live.com
    DocumentRoot "/usr/local/www"
    ServerName wwwer.org
    ServerAlias aaa.com bbb.com ccc.com  
    ErrorLog "/usr/local/www/log/abc-error_log"
    CustomLog /usr/local/www/log/abc-access_log common
</VirtualHost>
Tags: ,

Apache2开启mod_rewrite的方法

[ 2007/11/10 23:57 | by Johnny.He ]
本来要开启rewrite,只要打开httpd.conf,把下面这行前面的#去掉就可以了。

#LoadModule rewrite_module modules/mod_rewrite.so


可是昨天装了apache2最新版却出了意外,去掉了这行,rewrite还没打开

用了一个下午,百思不得其解.终于发现httpd.conf里有这么一段

<Directory "/usr/local/www">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#opt...
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>

将AllowOverride None改为AllowOverride All
重启Apache,终于搞定!
Tags:
从httpd.conf中 打开虚拟机
>apachectl restart

Syntax error on line 33 of /usr/local/etc/apache22/extra/httpd-vhosts.conf:
CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" clause (see docs)

如果在httpd-vhosts.conf中注释掉下面这句启动就不会有问题。

CustomLog "/usr/local/www/log/club.wwwer.org-access_log common"

并且 apachectl restart 特别的慢 如果把apache的虚拟目录关闭就很快。
Tags: ,

httpd.conf 中文版/中文注解

[ 2007/09/27 14:19 | by Johnny.He ]
网上溜达了一圈,又找了一份httpd.conf的中文版,大家仔细看看吧。偶尔看一遍。也许还有点启发!
-----------------------------------------------------
# 基于 NCSA 服务器的配置文件 由 Rob McCool 编写!
#
# Apache服务器主配置文件. 包括服务器指令的目录设置.
# 详见 <URL:http://www.apache.org/docs/>
#
# 请在理解用途的基础上阅读各指令。
#
# 再读取此文档后,服务器将继续搜索运行
# E:/Program Files/Apache Group/Apache/conf/srm.conf
# E:/Program Files/Apache Group/Apache/conf/access.conf
# 除非用ResourceConfig或AccessConfig覆盖这儿的标识
#
# 配置标识由三个基本部分组成:
# 1. 作为一个整体来控制Apache服务器进程的标识 (the 'global environment').
# 2. 用于定义主(默认)服务器参数的标识。
# 响应虚拟主机不能处理的请求。
# 同时也提供所有虚拟主机的设置值。
# 3. 虚拟主机的设置。在一个Apache服务器进程中配置不同的IP地址和主机名。
Tags:
  其中参照了下面的方法,为了方便后面我放置了中文的翻译 需要的可以点阅读全文看~

  Here's the scenario: you download the latest and greatest version of the Adobe Flash Player. After it finishes installing, you go to a site featuring Flash content and are greeted with a message notifying you that you need to install Flash Player, but didn't you just do that? To properly update your Flash Player, you need to run the installation as Administrator. Follow these steps to properly install Adobe Flash Player:
  For Vista (32 bit):

1. Open Computer.
2. Navigate to C:\Windows\System32\.
3. Scroll down and open the Macromed directory.
4. Open the Flash directory.
5. Right-click FlashUtil9b.
6. Select Run as Administrator.
7. When the UAC prompt appears, select Continue.
8. Follow the Flash Player installation wizard.

Tags: ,
  今天在电脑翻了半天,整理硬盘...
  突然发现 这东西在我的硬盘里 已经快2年了,又看了看,温故知新吧~~,你可以把下面这个文件保存在php.ini里,也可以看看,绝对收益!内容如下:
---------------------------------------------------------------------------
[PHP]
; PHP还是一个不断发展的工具,其功能还在不断地删减
; 而php.ini的设置更改可以反映出相当的变化,
; 在使用新的PHP版本前,研究一下php.ini会有好处的

;;;;;;;;;;;;;;;;;;;
; 关于这个文件 ;
;;;;;;;;;;;;;;;;;;;

; 这个文件控制了PHP许多方面的观点。为了让PHP读取这个文件,它必须被命名为
; 'php.ini'。PHP 将在这些地方依次查找该文件:当前工作目录;环境变量PHPRC
; 指明的路径;编译时指定的路径。
; 在windows下,编译时的路径是Windows安装目录。
; 在命令行模式下,php.ini的查找路径可以用 -c 参数替代。
Tags:
分页: 1/2 第一页 1 2 下页 最后页 [ 显示模式: 摘要 | 列表 ]