浏览模式: 普通 | 列表

apache 2.4.4 for windows版本下载

[ 2013-04-28 14:27:11 | 作者: admin ]
Below you will find 32 and 64 bit Windows installers for Apache HTTP Server 2.4.4 (officially released on February 25, 2013) and 2.2.24 (officially released on February 26, 2013). These releases provide fixes for quite a few bugs, some of which are security related. The official changelogs can be found here (2.4.4) and here...

阅读全文…

apache 禁止通过ip直接访问网站

[ 2013-04-28 14:24:22 | 作者: admin ]
如果服务器ip为211.11.11.11
下面这段虚拟主机放到作为第一个配置

<VirtualHost *:80>
ServerName 211.11.11.11
<Location />
Order deny,allow
Deny from all
</Location>
</VirtualHost>

原创日志 nginx和apache记录访问者端口 remote port

[ 2013-04-28 14:19:30 | 作者: admin ]
nginx升级到 1.2.8 log_format可以使用 $remote_port 全局变量。apache下面关于环境变量的使用有些因素影响,http和https下不同,版本也有差异,需要参考apache文档来核实。

apache2.2、apache2.4可以使用 %{format}P 获取端口,format可以使用 local或者remote,远程端口就是 %{remote}p
例子:
LogFormat "[%h]:%{remote}p %l %u %t \"%r\" %>s %b" common
更多设置可以参考
http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#logformat
http://httpd.apache.org/docs/2.4...

阅读全文…

vi 编辑器常用命令行

[ 2013-04-27 14:53:42 | 作者: admin ]
vi 常用命令行

1.vi 模式
    a) 一般模式: vi 处理文件时,一进入该文件,就是一般模式了.
    b) 编辑模式:在一般模式下可以进行删除,复制,粘贴等操作,却无法进行编辑操作。等按下‘i,I,o,O,a,A,r,R’等
                   字母之后才能进入编辑模式.通常在linux中,按下上述字母时,左下方会出现'INSERT'或者‘REPLACE’字样,才可以
                   输入任何文字到文件中.要回到一般模式,按下[ESC]键即可.
    c) 命令行模式:在一般模式中,输入“: 或者/或者?”,即可将光标移动到最下面一行,在该模式下,您可以搜索数据,而且读取,
         存盘,大量删除字符,离开vi,显示行号等操作.



2.vi 常用命令汇总:
  2.1 一般模式
      a) 移动光标:
          --> 上下左右方向键 ↑↓← →
...

阅读全文…

linux下用vi转dos换行符到unix换行符

[ 2013-04-27 14:47:58 | 作者: admin ]
提示: set ffs=unix,dos,mac

用vi编辑器打开文件
:set ffs 回车可以看到当前文件的类型,如果提示dos文件

:set ffs=unix 就讲换行符转成了unix,dos下为 \r\n ,unix下为 \n
停止操作停止操作是通过向nginx进程发送信号(什么是信号请参阅linux文 章)来进行的步骤1:查询nginx主进程号ps -ef | grep nginx在进程列表里 面找master进程,它的编号就是主进程号了。步骤2:发送信号从容停止Nginx:kill -QUIT 主进程号...

阅读全文…
VPS侦探原来一直使用的是Nginx 0.7.63,一直没什么问题,最近有空顺便升级一下,更新到最新比较稳定稳定的0.7.65,顺便做一下简单的维护。

Nginx编译后就一个小文件,不带动态库,升级也可以无缝升级,并不影响访问,lnmp一键安装包安装的环境直接按下面的命令执行就可以,具体想升级的版本可以到nginx上查看。

首先下载Nginx:执行wget http://soft.vpser.net/web/nginx/nginx-0.7.65.tar.gz

查看nginx原来的配置
nginx -V

再执行
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module ...

阅读全文…

mysql替换回车、换行符

[ 2013-04-26 18:53:08 | 作者: admin ]
UPDATE table_name set field_name=REPLACE(REPLACE(field_name,char(10),'<br>'),char(13),'<br>');