简体   繁体   中英

Different names for XAMPP virtual hosts

I've set up XAMPP (on Windows 7) to use virtual hosts in a simple manner. localhost:80 points to Apache's htdocs folder, and localhost:81 points to 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/ . Windows' hosts file doesn't care about ports - how can I achieve this?

This seems relevant to setting up multiple virtual hosts on XAMPP for windows 7 .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM