当前位置:首页>开发>正文

怎样在centos7上安装apache 如何在centos7上架构apache和nginx并行使用

2023-05-23 07:21:08 互联网 未知 开发

 怎样在centos7上安装apache 如何在centos7上架构apache和nginx并行使用

怎样在centos7上安装apache

yum -y install httpd httpd-devel gcc gcc-c libstdc -devel autoconf automake libtool
systemctl start httpd.service
systemctl enable httpd.service
firewall-cmd --permanent --add-service http
systemctl restart firewalld.service

如何在centos7上架构apache和nginx并行使用?

方式很简单,只要不让他们的监听端口相同就可以了。他们默认好像都是80,这样肯定有一个启动的时候回端口冲突,需要你手动修改配置。
nginx的配置在nginx.conf中
listen 80  //这是是监听端口,进行修改apache的配置在httpd.conf
Listen 80   //这是是监听端口,进行修改

centos7 nginx1.10 配置文件在哪


默认安装的话在 /etc/nginx/nginx.conf
还有可能在:/usr/local/nginx/conf/nginx.conf
或者通过 find / -name nginx.conf
查找配置文件在哪儿

最新文章

随便看看