[英]Different names for XAMPP virtual hosts
I've set up XAMPP (on Windows 7) to use virtual hosts in a simple manner. 我已经设置了XAMPP(在Windows 7上),以一种简单的方式使用虚拟主机。
localhost:80
points to Apache's htdocs
folder, and localhost:81
points to D:\\Projects\\
. localhost:80
指向Apache的htdocs
文件夹,而localhost:81
指向D:\\Projects\\
。 This works like a charm. 这就像一个魅力。
However, I would like to be able to access my projects folder using not only http://localhost:81/
, but also using http://projects/
. 但是,我希望不仅可以使用
http://localhost:81/
,而且还可以使用http://projects/
来访问我的项目文件夹。 Windows' hosts
file doesn't care about ports - how can I achieve this? Windows的
hosts
文件不关心端口-如何实现?
This seems relevant to setting up multiple virtual hosts on XAMPP for windows 7 . 这似乎与在Windows 7的XAMPP上设置多个虚拟主机有关 。
I'm not sure using ports is the best approach. 我不确定使用端口是否是最佳方法。 You might be better off setting up entirely different domain names to redirect to the correct local directory.
您最好设置完全不同的域名以重定向到正确的本地目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.