linux - 能否在同一台服务器上同时安装和运行 nginx 和 apache 且同时监听 80端口?
PHP中文网
PHP中文网 2017-04-17 13:05:06
0
7
877

有一台 vps 上面已经装了 apache 跑着一个Wordpress的博客。
想再装一个 nginx,挂一个 typecho,都在80端口,可行吗?

PHP中文网
PHP中文网

认证0级讲师

reply all(7)
左手右手慢动作

Two programs cannot monitor the same port at the same time. You can try using nginx+php-fpm or all on apache.

I personally recommend using nginx+php-fpm, because php-fpm has been officially included and maintained by the official team, and wordpress.com also uses a deployment solution like nginx+php-fpm.

阿神

Why not configure several different apps on nginx?

Nginx can be configured with several different domain names.

For example
http://xiugq.blog.51cto.com/813544/693448

小葫芦

Just configure multiple domain names. Why do you have to use apache and nginx to monitor at the same time?

洪涛

Multiple IPs are OK.
For example one is 111.111.111.111:80 and the other is 127.0.0.1:80 .

迷茫

You can use nginx reverse proxy, but it is recommended that you move WordPress to apache.

阿神

No, it will conflict.

刘奇

If you just answer the question,
Then it’s: no.
There can only be one software listening on a port.

If you have another answer, then it would be:
Web server has multiple domain names (the same host can be accessed through multiple domain names) (the virtual machine can be accessed by changing the host to create a virtual domain name),

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!