当前位置: 操作系统/服务器>linux
本页文章导读:
▪限制 Apache日志文件大小的方法
通常我们是在{$apache}/conf/httpd.conf中设置Apache的参数,然而我们并没有发现可以设置日志文件大小的配置指令,通过参考http://httpd.apache.org/docs/2.0/programs/rotatelogs.html,可以用apache 自己的程序 .........
▪IIS 学习笔记
1.问题:在IIS上发布一个站点,在本地可以访问,在别的机器不能访问。 对策:确认IIS所在机器的防火墙是否关闭,如果没有,关闭防火墙试试。当然最好的办法是修改防火墙的配置,不是.........
▪IIS7 fastcgi方式安装php
Microsoft Windows [Version 6.0.6001] Copyright (c) 2006 Microsoft Corporation. All rights reserved. E:\Windows\system32>cd ../../x86 E:\x86>dir Volume in drive E has no label. Volume Serial Number is 960B-9039 Directory of E:\x86 2007/09/30 15.........
[1]限制 Apache日志文件大小的方法
来源: 互联网 发布时间: 2013-12-24
通常我们是在{$apache}/conf/httpd.conf中设置Apache的参数,然而我们并没有发现可以设置日志文件大小的配置指令,通过参考http://httpd.apache.org/docs/2.0/programs/rotatelogs.html,可以用apache 自己的程序 rotatelogs.exe(位于 {$apache}/bin/目录下),来限制日志文件的大小。
Usage: rotatelogs [-l] [offset minutes from UTC] or
Add this:
TransferLog "|rotatelogs /some/where 86400"
or
TransferLog "|rotatelogs /some/where 5M"
to httpd.conf. The generated name will be /some/where.nnnn where nnnn is the system time at which the log nominally starts (N.B. if using a rotation time, the time will always be a multiple of the rotation time, so you can synchronizecron scripts with it). At the end of each rotation time or when the file size is reached a new log is started.
在 Windows 下的设置例子如下:
# 限制错误日志文件为 1M
ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 1M"
# 每天生成一个错误日志文件
#ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 86400"
# 限制访问日志文件为 1M
CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 1M" common
# 每天生成一个访问日志文件
#CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 86400" common
linux/Unix下 应该类似。
Usage: rotatelogs [-l] [offset minutes from UTC] or
Add this:
TransferLog "|rotatelogs /some/where 86400"
or
TransferLog "|rotatelogs /some/where 5M"
to httpd.conf. The generated name will be /some/where.nnnn where nnnn is the system time at which the log nominally starts (N.B. if using a rotation time, the time will always be a multiple of the rotation time, so you can synchronizecron scripts with it). At the end of each rotation time or when the file size is reached a new log is started.
在 Windows 下的设置例子如下:
# 限制错误日志文件为 1M
ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 1M"
# 每天生成一个错误日志文件
#ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 86400"
# 限制访问日志文件为 1M
CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 1M" common
# 每天生成一个访问日志文件
#CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 86400" common
linux/Unix下 应该类似。
[2]IIS 学习笔记
来源: 互联网 发布时间: 2013-12-24
1.问题:在IIS上发布一个站点,在本地可以访问,在别的机器不能访问。
对策:确认IIS所在机器的防火墙是否关闭,如果没有,关闭防火墙试试。当然最好的办法是修改防火墙的配置,不是让它全部不起作用。
2.问题:在IIS上发布了一个站点,静态页可以访问,但是连不上数据库。
对策:给数据库所在机器中数据库文件所在文件夹赋于所于访问权限。可以通过下面方法测试:右键文件夹,安全,增加everyone用户,将左边一列的多选框全部选中。
对策:确认IIS所在机器的防火墙是否关闭,如果没有,关闭防火墙试试。当然最好的办法是修改防火墙的配置,不是让它全部不起作用。
2.问题:在IIS上发布了一个站点,静态页可以访问,但是连不上数据库。
对策:给数据库所在机器中数据库文件所在文件夹赋于所于访问权限。可以通过下面方法测试:右键文件夹,安全,增加everyone用户,将左边一列的多选框全部选中。
[3]IIS7 fastcgi方式安装php
来源: 互联网 发布时间: 2013-12-24
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
E:\Windows\system32>cd ../../x86
E:\x86>dir
Volume in drive E has no label.
Volume Serial Number is 960B-9039
Directory of E:\x86
2007/09/30 15:01 <DIR> .
2007/09/30 15:01 <DIR> ..
2007/01/22 18:18 132,096 fcgisetup.exe
2007/01/15 16:33 1,531 iisfcgi_schema.xml
2006/10/27 15:12 9,445 license.txt
2007/01/20 18:58 2,450 readme.txt
2007/01/22 16:49 <DIR> x86
4 File(s) 145,522 bytes
3 Dir(s) 12,789,080,064 bytes free
E:\x86>fcgisetup.exe
fcgisetup.exe [/?] [/install] [/uninstall] [/add prog ext] [/remove prog]
/install - Install FastCGI support
/uninstall - Uninstall FastCGI support
/add - Register a FastCGI program
to handle the specified extensions
/remove - Un-register a FastCGI program
/? - Display this help message
Examples:
fcgisetup.exe /install /add c:\php\php-cgi.exe php,phpt
1 step install - install FastCGI support on the server AND
register the php-cgi.exe FastCGI program as the script processor
for the PHP extension
fcgisetup.exe /install
Just install FastCGI support on the server
fcgisetup.exe /uninstall
Un-install FastCGI support on the server
fcgisetup.exe /add c:\php\php-cgi.exe php,phpt
Register the php-cgi.exe FastCGI program as the script processor
for php, and phpt extensions
fcgisetup.exe /remove c:\php\php-cgi.exe
Un-register the php-cgi.exe FastCGI program
E:\x86>fcgisetup.exe /install
Stopping IIS services …
Copied files
Registered FastCGI configuration section
Installed FastCGI module
Starting IIS services …
Success: Installation completed succesfully
E:\x86>fcgisetup.exe /add e:\php\php-cgi.exe php,phpt
Configured FastCGI pool
Created handler mappings
Success: Installation completed succesfully
E:\x86>
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
E:\Windows\system32>cd ../../x86
E:\x86>dir
Volume in drive E has no label.
Volume Serial Number is 960B-9039
Directory of E:\x86
2007/09/30 15:01 <DIR> .
2007/09/30 15:01 <DIR> ..
2007/01/22 18:18 132,096 fcgisetup.exe
2007/01/15 16:33 1,531 iisfcgi_schema.xml
2006/10/27 15:12 9,445 license.txt
2007/01/20 18:58 2,450 readme.txt
2007/01/22 16:49 <DIR> x86
4 File(s) 145,522 bytes
3 Dir(s) 12,789,080,064 bytes free
E:\x86>fcgisetup.exe
fcgisetup.exe [/?] [/install] [/uninstall] [/add prog ext] [/remove prog]
/install - Install FastCGI support
/uninstall - Uninstall FastCGI support
/add - Register a FastCGI program
to handle the specified extensions
/remove - Un-register a FastCGI program
/? - Display this help message
Examples:
fcgisetup.exe /install /add c:\php\php-cgi.exe php,phpt
1 step install - install FastCGI support on the server AND
register the php-cgi.exe FastCGI program as the script processor
for the PHP extension
fcgisetup.exe /install
Just install FastCGI support on the server
fcgisetup.exe /uninstall
Un-install FastCGI support on the server
fcgisetup.exe /add c:\php\php-cgi.exe php,phpt
Register the php-cgi.exe FastCGI program as the script processor
for php, and phpt extensions
fcgisetup.exe /remove c:\php\php-cgi.exe
Un-register the php-cgi.exe FastCGI program
E:\x86>fcgisetup.exe /install
Stopping IIS services …
Copied files
Registered FastCGI configuration section
Installed FastCGI module
Starting IIS services …
Success: Installation completed succesfully
E:\x86>fcgisetup.exe /add e:\php\php-cgi.exe php,phpt
Configured FastCGI pool
Created handler mappings
Success: Installation completed succesfully
E:\x86>
最新技术文章: