[root@csit httpd]# cd
/etc/httpd/conf.d/ #进入配置文件目录
[root@csit conf.d]$ grep NSSEngine * #查找配置选项,并且知道在 nss.conf 这个文件中
nss.conf:NSSEngine on
[root@csit conf.d]$ vi nss.conf
#注释NSSEngine
# SSL Engine Switch:
# Enable/Disable SSL for thisvirtual host.
#NSSEngine on
[root@csit httpd]# service httpd restart
重启服务后正常启动。
报错:解决方案:
查看80端口是否被占用
[root@web01 ~]# lsof -i:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 6751 root 6u IPv4 35889 0t0 TCP *:http (LISTEN)
nginx 6752 www 6u IPv4 35889 0t0 TCP *:http (LISTEN)
可见被nginx占用,打开httpd配置文件修改端口
[root@web01 ~]# vim /etc/httpd/conf/httpd.conf
搜索Listen 改为8080
[root@web01 ~]# systemctl restart httpd
[root@web01 ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.servicedisabledvendor preset: disabled)
Active: active (running) since Wed 2020-10-21 00:14:38 CST6s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 8873 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Main PID: 8953 (httpd)
Status: "Processing requests..."
CGroup: /system.slice/httpd.service
├─8953 /usr/sbin/httpd -DFOREGROUND
├─8954 /usr/sbin/httpd -DFOREGROUND
├─8955 /usr/sbin/httpd -DFOREGROUND
├─8956 /usr/sbin/httpd -DFOREGROUND
├─8957 /usr/sbin/httpd -DFOREGROUND
└─8958 /usr/sbin/httpd -DFOREGROUND
Oct 21 00:14:07 web01 systemd[1]: Starting The Apache HTTP Server...
Oct 21 00:14:17 web01 httpd[8953]: AH00558: httpd: Could not reliably determine the server's fully qualified dom...essage
Oct 21 00:14:38 web01 systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
搞定!!!
注意:
再次访问一定要吧端口加进去,比如访问10.0.0.5:8080 中间的冒号一定是英文格式,不然访问不出
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)