首先我改host文件
127.0.0.1 localhost
127.0.0.1 spx
这样的话,在输入入栏中输入spx也是进入到localhost下
我现在想输入localhost进入到APACHE设置的www目录下
输入spx就进入到F:/spx下,我在网站找了好多资料都不行
谢谢大家了。
127.0.0.1 localhost
127.0.0.1 spx
这样的话,在输入入栏中输入spx也是进入到localhost下
我现在想输入localhost进入到APACHE设置的www目录下
输入spx就进入到F:/spx下,我在网站找了好多资料都不行
谢谢大家了。
在Apache\conf\extra\目录下找到httpd-vhosts.conf
添加类似如下xml格式文件
<VirtualHost *:80>
DocumentRoot F:/spx
ServerName spx
ServerAlias *.spx
</VirtualHost>
然后在Apache配置文件httpd.conf中找到Include conf/extra/httpd-vhosts.conf去掉前面的#号
我试了一下可以访问,但有权限问题 你需要自己解决