配置
ServerTokens ProductOnly
ServerSignature Off
在debian系的linux中配置文件太过分散,修改的时候注意要改对地方,否则将没有任何效果。
配置
ServerTokens ProductOnly
ServerSignature Off
在debian系的linux中配置文件太过分散,修改的时候注意要改对地方,否则将没有任何效果。
<VirtualHost *:443>
ServerName www.zhangyiqun.net
ServerAlias zhang.net
DocumentRoot /xxx
ErrorLog /xxx
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
#SSL
SSLEngine on
SSLCACertificateFile /etc/apache2/ca.txt
SSLCertificateFile /etc/ssl/crt/www.vpn38.net.crt
SSLCertificateKeyFile /etc/ssl/crt/private.key
</VirtualHost>
需要开启ssl模块,否则会出现ssl command not found之类的错误
下午为凸墙调试支付宝接口,遇到了几个小问题
URL中的UTF-8–>gb2312的转换
$urlname='Month/包月'; echo urlencode($urlname); echo iconv('utf-8','gb2312',urldecode('Month%2F%E5%8C%85%E6%9C%88')); |
Apache强制字符转换
关键在于配置中的“AddDefaultCharset UTF-8”这一行,这句的意思是所有的网页显示默认的编码都是“UTF-8”,其他编码要手动选择才能够正常显示,gb2312当然不例外。在这个约束下,即便在写网页程序时用Meta标示指定为GB2312也无济于事,因为apache已经有了明文强制要求。
开始我还以为是drupal代码中写了强制utf-8相关的语句所造成的
# httpd -S
[Fri Dec 25 21:28:03 2009] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
# vi httpd.conf
Add NameVirtualHost as follows:
NameVirtualHost *:80
that’s all
原文连接 http://www.cyberciti.biz/faq/warn-_default_-virtualhost-overlap-port80-first-hasprecedence/
CentOS release 5.2 (Final)
# yum –disablerepo=* –enablerepo=c5-media install httpd
# yum –disablerepo=* –enablerepo=c5-media install tomcat*
注意yum安装的顺序
# vim /etc/tomcat5/tomcat-users.xml
<user username=”ad” password=”123″ roles=”admin,manager”/>