1.安装mini_httpd
cd /usr/src/redhat/SOURCES wget http://www.acme.com/software/mini_httpd/mini_httpd-1.19.tar.gz
tar -zcvf mini_httpd-1.19.tar.gz
cd mini_httpd-1.19.tar.gz
make install
/usr/local/sbin/mini_httpd -V
会输出:/mini_httpd-1.19证明成功。
2.
2.配置mini.conf ,主要是为客户端通过CGI与服务器通信用
先在根目录下建一个web目录,也可以在其他地方建,如/usr/local/www/,在web目录下建个子目录html和mini_http.conf,mini_http.conf内容如下:
user=root #指定用户切换到作为根用户在初始化时开始
port=8080 #指定一个替代监听端口号
dir=/web/html #在启动时指定一个目录,此目录包括mini_http.conf
cgipat=**.cgi #CGI程序路径
pidfile=/web/mini_httpd.pid #pid文件路径,pid文件为文本文件, 记录了该进程的ID。
logfile=/web/mini_httpd.log #日志文件路径
charset=UTF-8 #指定要使用的字符集与文本的MIME类型
ssl #启用SSL / HTTPS功能
certfile=/etc/mini_httpd.pem #用这个标志指定一个服务器证书
root@long:/web# /usr/local/sbin/mini_httpd -C /web/mini_httpd.conf可以了解
bind: Address already in use
mini_httpd: started as root without requesting chroot(), warning only
上面警告,但是mini_httpd已经启动
1 在fedroa20中安装mini_http,是出现问题,问题如下:本地执行localhost:8080可以打开网页,但是执行https://192.168.5.134:8080/,反而打不开网页。当关掉SElinux和防火墙后,可以打开网页。
systemctl start/stop firewalld 启动和关闭防火墙
systemctl disable firewalld 禁用防火墙
2 将mini_http.pem和password拷入到以前对应的文件夹中,就会出现密码和前面的登陆。