IIS occupies port 80. Apache also occupies port 80. After changing the apache port to 8080, the php site cannot be accessed through IIS. It feels too troublesome to publish php sites with apache. Is there any simple way to publish php?
光阴似箭催人老,日月如移越少年。
Method 1
在IIS上配置PHP环境,直接把PHP项目部署到IIS,不用Apache
Method 2
你把Apache的项目部署到IIS
Method 3
Apache可以重定向,IIS部署8080,对应项目重定向到IIS
1. It is recommended to configure PHP in IIS, it is also very easy to use now
2. If you insist on installing Apache, you can install nginx
Nginx 监听 80 IIS 监听 8080 Apache 监听 8081
server { listen 80; server_name $host; location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; } } server { listen 80; server_name www.abc.com abc.com php.abc.com; location / { proxy_pass http://127.0.0.1:8081; proxy_set_header Host $host; } }
Method 1
Method 2
Method 3
1. It is recommended to configure PHP in IIS, it is also very easy to use now
2. If you insist on installing Apache, you can install nginx