Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WAMP: Missing http://localhost/ in urls , wrong wamp projects links

I have a problem with Wamp which never happened to me before, cannot find what's wrong. I have a few projects located in my www folder ( running windows 7 ).

My hostfile has the line 127.0.0.1 localhost uncommented

When I go to http://localhost/ or http://127.0.0.1/ and click on a project name like "mysite" from the main Wamp panel page, the link just points to "mysite" and not "http://localhost/mysite"

Therefore I can't see any sites, what should I do ?

like image 517
mlclm Avatar asked Jun 25 '14 12:06

mlclm


People also ask

How can I access localhost in WAMP server?

To open up the localhost homepage, click the green “W” icon in your system tray and choose Localhost. You will be presented with the localhost homepage in a new browser window.

Why Wampserver is not working?

It says that whatever port is used by Apache (Wamp server) is currently used by some other service, so if you want to start the Apache service then you have to changethe port of this Wampserver service. Now for changing the port you have to go to Wampserver menu => Apache. Open httpd. conf file.


2 Answers

For the latest versions on Wamp, the file has changed the code as follows:

$suppress_localhost = ($wampConf['urlAddLocalhost'] == 'off' ? true : false);

So it is now configurable from the Wamp Aestan Tray menu.

For Wampserver 3.0.6, I was able to do this by the following:

  1. Right click on wamp icon on tray on the right.
  2. Go to "wamp settings"
  3. Enable "Add localhost in URL"

If you see the green tick mark, it is enabled. Now refresh your localhost home page and check URLs.

like image 76
Vikram Dhanjal Avatar answered Oct 25 '22 20:10

Vikram Dhanjal


In WAMPSERVER 3.1.x

Open wamp/www/index.php

Go to line number 33

Change this line:

$suppress_localhost = ($wampConf['urlAddLocalhost'] == 'off' ? true : false);

To:

$suppress_localhost = ($wampConf['urlAddLocalhost'] == 'on' ? true : false);

Save and close the file.

OR

Right click on system tray Wampserver icon and hover on,

Click Wamp Settings option

After that choose this: Add localhost in url

like image 35
Sanu Avatar answered Oct 25 '22 19:10

Sanu