1.windows下不同端口部署php和html工程
编辑Apache/conf下httpd.conf文件
注释掉以下两行:
# ServerName localhost:81
#DocumentRoot "D:\www"
设置8006和8009端口:
Listen 8006
<VirtualHost localhost:8006>
DocumentRoot "D:\findpro"
ServerName localhost:8006
<Directory />
Options All
AllowOverride All
Require all granted
</Directory>
<Directory "D:\sshfile">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Listen 8009
<VirtualHost localhost:8009>
DocumentRoot "D:\sshfile"
ServerName localhost:8009
<Directory />
Options All
AllowOverride All
Require all granted
</Directory>
<Directory "D:\sshfile">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
2.在linux系统下
在/etc/httpd/conf/httpd.conf中
跟windows下一样。