Home > Backend Development > PHP Tutorial > 求PHP的服务器设置多个本地站点

求PHP的服务器设置多个本地站点

WBOY
Release: 2016-06-20 12:43:15
Original
1025 people have browsed it

请问用apache服务器可以像IIS那样根据端口号或域名设置多个本地网站站点吗?
如:http://localhost:80 , http://localhost:81 , http://localhost:82


回复讨论(解决方案)

Apache还真不行,像iis那样的,可以用同一个端口设置多个域名站点的可以用nginx。不过我在windows下实测nginx在windows下性能不是很好。在Linux下nginx非常不错。

已解决,只要在httpd.conf文件的最后加上以下内容即可:

ServerName "127.0.0.2:80"
DocumentRoot "E:/works/php-2"

Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template