Help setting up WAMP Server

2

I have a problem with the WAMP server, where I can not access my project by LocalHost when I click directly on the project name, only if you type "localhost / project_name" .

Does anyone have any tips to configure?

    
asked by anonymous 22.03.2017 / 17:08

1 answer

1

Inside the WWW folder of wamp, you will find a file named index.php, open it.

On line 338 you will find the following

$projectContents .= '<li><a href="'.($suppress_localhost ? '//' : '').$file.'">'.$file.'</a></li>';

If you do not find a search for $ projectContents in the editor of your choice for you to find the right line, depending on the version you can change the line.

To correct this problem we must add the HTTP: // front word to the localhost word, because this line is responsible for putting the url in the browser, because of the way that wamp mounts the url only with the name of its project for example, and this way will not open our file, showing non-existent page error.

So to solve this problem we should leave this line like this:

$projectContents .= '<li><a href="'.($suppress_localhost ? '//localhost/' : '').$file.'">'.$file.'</a></li>';

By default, your localhost should already be accessing your jobs by clicking the folder.

Now in the folder wamp / scripts / we have a file called refresh.php, open it and in line 651 you will find the following command:

$myreplacesubmenuProjects .= 'Type: item; Caption: "'.$projectContents[$i].'"; Action: run; FileName: "'.$c_navigator.'"; Parameters: "// '.$projectContents[$i].'/"; Glyph: 5';

To fix, we should do the same thing in front of // like this:

$myreplacesubmenuProjects .= 'Type: item; Caption: "'.$projectContents[$i].'"; Action: run; FileName: "'.$c_navigator.'"; Parameters: "//localhost/'.$projectContents[$i].'/"; Glyph: 5 ';

Restart wamp services just under warranty and, if all goes well, your projects can be accessed through localhost.

    
22.03.2017 / 17:29