Linux系统下Apache+OpenSSL源码安装并配置https服务
来源:互联网 发布:linux画面撕裂 编辑:程序博客网 时间:2024/05/16 11:21
软件版本:
一 支持软件安装
1. 安装apr
./configure --prefix=/path/apr (path为安装apr的路径)
sudo make
sudo make install
2. 安装apr-util
./configure --prefix=/path/apr-util --with-apr=/path/apr
sudo make
sudo make install
3. 安装pcre
./configure --prefix=/path/pcre
sudo make
sudo make install
(注:不要安装pcre2,否则会出现error: Did not find pcre-config script at /path/pcre)
二 安装httpd
sudo ./configure --prefix=path --enable-so --enable-ssl --with-ssl=/usr/local/ssl --enable-mods-shared=all --enable-static-ab --with-apr=/path/apr --with-apr-util=/path/apr-util --with-pcre=/path/pcre (path为httpd的安装路径) (/usr/local/ssl为OpenSSL的安装路径)
sudo make
sudo make install
三 生成证书
1. 生成一个RSA密钥
openssl genrsa -out server.key
2. 生成一个证书请求
openssl req -new -key server.key -out server.csr
3. 自己签发证书
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
四 配置httpd.conf文件
1. Listen 80
2. LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
(注:若不加载该模块,httpd-ssl.conf会报SSLSessionCache: 'shmcb' session cache not supported (known names: ). Maybe you need to load the appropriate socache module (mod_socache_shmcb?).)
3. LoadModule ssl_module modules/mod_ssl.so
4. ServerName IP/WebSite:80
5. Include conf/extra/proxy-html.conf
五 配置httpd-ssl.conf文件
1. Listen 443
2. DocumentRoot 可以改为自己存放页面的路径,例如/usr/local/pages
改变路径后,需要添加以下指令使得用户具有访问该路径中页面的权限
<Directory “/usr/local/pages”>
Options Indexes FollowSymLinks
Override None
Require all granted
</Directory>
3. ServerName IP/WebSite:443
4. SSLCertificateFile "/path/server.crt" (path为放置server.crt的路径)
5. SSLCertificateKeyFile "/path/server.key" (path为放置server.key的路径)
六 注意
1. DocumentRoot 对应的文件路径中的所有parent directories都应该具有可执行权限即x-bit应该被设置为1,否则客户端在访问页面时会出现Forbidden:You don't have permission to access /on this server. 这样的问题。
- Linux系统下Apache+OpenSSL源码安装并配置https服务
- linux 下部署 openssl+apache 配置https
- Linux下apache、openssl、mod_ssl安装、配置
- 安装基于openssl的https服务配置
- ECS CentOS 6.5系统下Apache配置https服务
- Linux下安装Apache Openssl
- Linux下的源码安装服务,配置服务为系统服务启动
- Linux下源码安装OpenSSL
- Linux下apache+php源码安装配置
- mac下Apache服务配置Https
- Apache下https服务的配置
- linux系统下安装与配置apache
- 在Linux上配置Apache HTTPS服务
- Linux下设置Apache支持Https服务
- Linux下采用二进制源码安装mysql,并配置使用mysqld命令启动服务
- linux下apache+openssl配置记录
- linux安装nginx并设置https(openssl)
- Ubuntu下APACHE HTTPS安装和配置
- JSON字符串如何转化成对象?
- 浅谈Java中的hashcode方法
- Hive学习之Hive数据类型
- nosql
- ios 黑魔法 解决问题
- Linux系统下Apache+OpenSSL源码安装并配置https服务
- 正则表达式常用例子
- ASUS Z-170A 主板锁定 CPU 频率
- 冒泡排序及其优化
- POJ 3660(floyd)
- Android使用byte数组生成一张灰度图
- androidstudio导入youkuPlayerOpenSDK失败解决
- 为什么在定义hashcode时要使用31这个数呢?
- Linux shell命令