广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 6927 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
whong168 手机
个人文章 个人相簿 个人日记 个人地图
小有名气
级别: 小有名气 该用户目前不上站
推文 x0 鲜花 x53
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
Apache2 + SSL + PHP5
[转贴]http://pank.org/blog/archives/000712.html

Apache2 + SSL + PHP5
据说 Apache 2.0 的效能较好, 一些常用的 Module, 已经内含, 很方便.
准备档案
wget http://ftp.cis.nctu.edu.tw/data/UNIX/...pd-2.0.54.tar.gz
wget http://tw.php.net/get/php-5.0.5.t...php.net/mirror
安装
tar zxf httpd-2.0.54.tar.gz
tar jxf php-5.0.5.tar.bz2
cd httpd-2.0.54 (Apache2)
./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf \
  --enable-module=so \
  --enable-ssl --enable-rewrite --enable-proxy
make
make install
cd ../php-5.0.5 (PHP5)
./configure --with-mysql --with-apxs2=/usr/local/apache/bin/apxs \
  --enable-module=so --with-config-file-path=/usr/local/etc \
  --libexecdir=/usr/local/apache/libexec --with-iconv \
  --with-gd --with-zlib --with-jpeg-dir
make
cp .libs/libphp5.so /usr/local/apache/modules (把 PHP5 modules copy 到 Apache modules 目录下)
SSL
参考 How can I create and use my own Certificate Authority (CA)?
cd /usr/local/apache/conf
openssl genrsa -out server.key
(若要 Apache 启动时不需密码, 就不要加 -des3, 若有加 -des3 后, 最后要调整为不要密码, 可参考 How to remove a pass phrase?)
openssl req -new -key server.key -out server.csr
openssl genrsa -out ca.key
openssl req -new -x509 -days 3650 -key ca.key -out ca.crt
./sign.sh server.csr (sign.sh 在 modssl tar ball 内 pkg.contrib 目录可以找到)
chmod 400 server.*
mv server.crt ssl.crt
mv server.key ssl.key
若觉得上述步骤太麻烦, 也可以这样来产生自签 Key
openssl req -new -x509 -nodes -out ssl.crt/server.crt -keyout ssl.key/server.key -days 3650
设定 httpd.conf
LoadModule php5_module modules/libphp5.so
DirectoryIndex index.html index.htm index.php (在 DirectoryIndex 该行后加上 index.php)
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
启动 /usr/local/apache/bin/apachectl startssl


看一些大形网站好似已都用apache2.0了



百花丛里过
  片叶不沾身
无所从来
  亦无所去

献花 x0 回到顶端 [楼 主] From: | Posted:2005-09-12 14:06 |
lapklaman
个人文章 个人相簿 个人日记 个人地图
小有名气
级别: 小有名气 该用户目前上站
推文 x3 鲜花 x427
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

感谢大大的分享


献花 x0 回到顶端 [1 楼] From:台湾中华电信 | Posted:2010-03-13 09:21 |
mnbmnb5266
个人文章 个人相簿 个人日记 个人地图
小有名气
级别: 小有名气 该用户目前不上站
推文 x5 鲜花 x46
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

谢谢大大的分享,先来看一下了。


我的收藏
https://pan.baidu.com/s/1QUJ9lr_VzxXKRJAlBJgUQA
提取码:am2c
献花 x0 回到顶端 [2 楼] From:加拿大Rogers | Posted:2010-08-25 19:07 |

首页  发表文章 发表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.020408 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言