dtd793353 2016-12-30 05:35
浏览 53

WAMP服务器不会在localhost和后缀端口号前加上[duplicate]

This question already has an answer here:

Problem 1 :

The folders listed under Your Projects doesn't have the http://localhost/ prefix by default.

So instead of going to http://localhost/your_project/ , it goes to http://your_project/

Problem 2 :

And after changing my default Apache port number to 8085 (due to Skype conflict), the port number wont automatically get suffixed to http://localhost/.

So instead of going to http://localhost:8085/my_project, it simply goes to http://localhost/my_project/ (which obviously does not work).

</div>
  • 写回答

1条回答 默认 最新

  • dongzun9958 2016-12-30 05:35
    关注

    Solution to problem 1 :

    Locate and open index.php from www directory (C:\wamp\www\index.php)

    Find this line :

    $UrlPort = $port !== "80" ? ":".$port : '';
    

    Change it to :

    $UrlPort = $port !== "80" ? ":".$port : ':8085';
    

    where 8085 is the new port number in your case


    Solution to problem 2 :

    Locate and open wampmanager.conf from wamp installation directory (C:\wamp\wampmanager.conf)

    Find this line :

    urlAddLocalhost = "off"
    

    Change it to :

    urlAddLocalhost = "on"
    

    评论

报告相同问题?

悬赏问题

  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算