douji5329 2016-05-25 02:08
浏览 59
已采纳

too long

Currently, I have XAMPP setup to where typing 127.0.0.1 in the browser redirects me to the home page found within htdocs.

I would like to be able to type "devtest" and have that be an alias for 127.0.0.1.

What I have tried so far is modifying: C:\xampp\apache\conf\extra\httpd.vhosts.conf where I added an entry that looks like:

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot C:\xampp\htdocs\Workspace\MyProject
    ServerName devtest
    ErrorLog C:\xampp\htdocs\Workspace\MyProject\MyProject-error_log
    CustomLog C:\xampp\htdocs\Workspace\MyProject\MyProject-access_log common
</VirtualHost>

Is there another step I'm missing?

  • 写回答

2条回答 默认 最新

  • doubaoxue5788 2016-05-25 08:19
    关注

    Open the hosts file in Notepad:

    C:\Windows\System32\drivers\etc\hosts

    Add the line:

    127.0.0.1 devtest
    

    Navigate to: http://devtest

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用