localhost shows list of files not the default Wamp page
Posted by: caydee (---.customer.vsm.sh)
Date: September 10, 2020 02:18PM

Hello All,

Windows update wiped out my host files by retrieving these something went awry. Now localhost shows a list of files instead of the default Wamp page.
How can I get it back, please?

Regards and thank you!

Caydee

IN ALL THINGS BE MEN
Windows 10 x64 | WAMP 3.2.1 - x64 | Apache 2.4.33 | MySQL 5.7.21 | PHP 7.4.5 | PHP MyAdmin 5.0.2

Options: ReplyQuote
Re: localhost shows list of files not the default Wamp page
Posted by: RiggsFolly (Moderator)
Date: September 10, 2020 02:26PM

Hi,

Do you mean you lost C:\windows\system32\drivers\etc\hosts ?

If so that shoudl be easy to recreate, all you need to do is look at your `httpd-vhosts.conf` file and for each `ServerName`you find, add a line to the HOSTS File.

like
127.0.0.1 locahost
::1 localhost

127.0.0.1 mydomain1
::1 mydomain1

etc etc etc

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.2.0 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.19>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: localhost shows list of files not the default Wamp page
Posted by: Otomatic (Moderator)
Date: September 10, 2020 03:04PM

Hi,

With "big" Windows updates, it is not only the hosts file that can be rewritten, there can also be uninstall of some VC++ packages ... so:
- Verify that all VC ++ packages are installed and with the latest versions.
To do this, use the tool:
Checks VC++ packages installed
Do not use a previously loaded tool. Make a new download to make sure you are using the correct version.
To download missing packages, do not rely on Microsoft links, they are not reliable, download packages on http://wampserver.aviatechno.net in section Visual C++ Redistribuable Packages
Do not forget that if you have a 64 bit Windows, you must install both 32 and 64 bit versions of each package.
You must install each package "as an administrator", so right-click the exe file and then run as Administrator.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.4 32 bit - Apache 2.4.46a - PHP 7.4.12…5.6.40 - MySQL 5.7.31 - MariaDB 10.5.8
Wampserver 3.2.4 64 bit - Apache 2.4.46a - PHP 7.4.12…5.6.40 - MySQL 5.7.31/8.0.21 - MariaDB 10.5.8
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: localhost shows list of files not the default Wamp page
Posted by: caydee (---.customer.vsm.sh)
Date: September 10, 2020 07:20PM

Hi,

@ Riggsfolly: It left the hosts file and the 2 entries there, but after those 2 entries I had very many test sites and also many entries against the Microsoft Telemetry Hosts put in there by Spybot Anti-Beacon. You would have to go to the Security & Updates and revive or reverse the action on the deleted entries inside Defender.

@ Otomatic: I ran the script and it did indeed show 2 of the VC++ Packages as not installed, which I promptly reinstalled!

But the action seems not have restored the Wampserver localhost page. It is still showing the "Index of/" with a list of folders to some Laravel Packages, Bootstrap, Composer etc.

I can go on without that page, but would really like to have it back. Wamp is after all purring just fine!

Regards,

Caydee

IN ALL THINGS BE MEN
Windows 10 x64 | WAMP 3.2.1 - x64 | Apache 2.4.33 | MySQL 5.7.21 | PHP 7.4.5 | PHP MyAdmin 5.0.2

Options: ReplyQuote
Re: localhost shows list of files not the default Wamp page
Posted by: RiggsFolly (Moderator)
Date: September 10, 2020 07:26PM

CayDee,

Quote

It left the hosts file and the 2 entries there, but after those 2 entries I had very many test sites

That is why I wrote `etc etc etc` By that I ment that you should look through your list of test sites and add them back into the hosts file.

If you really want the spybot stuff back, then thats not our area. But I would simply uninstall it and ..... well I would not reinstall it, but you could if you want to.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.2.0 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.19>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 09/10/2020 07:32PM by Otomatic.

Options: ReplyQuote
Re: localhost shows list of files not the default Wamp page
Posted by: Otomatic (Moderator)
Date: September 10, 2020 07:36PM

Hi,

> Microsoft Telemetry Hosts put in there by Spybot Anti-Beacon.
Fuck all this shit up. The hosts file is not meant to filter urls, it's the browsers that have to filter urls.
The hosts file must contain:
127.0.0.1 localhost
::1 localhost
plus the ServerNames of the local sites and nothing else.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.4 32 bit - Apache 2.4.46a - PHP 7.4.12…5.6.40 - MySQL 5.7.31 - MariaDB 10.5.8
Wampserver 3.2.4 64 bit - Apache 2.4.46a - PHP 7.4.12…5.6.40 - MySQL 5.7.31/8.0.21 - MariaDB 10.5.8
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: localhost shows list of files not the default Wamp page
Posted by: caydee (---.customer.vsm.sh)
Date: September 11, 2020 01:19PM

Good Day Gentlemen,

Alright Folks - ON YOUR HEADS BE IT!

Caydee

IN ALL THINGS BE MEN
Windows 10 x64 | WAMP 3.2.1 - x64 | Apache 2.4.33 | MySQL 5.7.21 | PHP 7.4.5 | PHP MyAdmin 5.0.2

Options: ReplyQuote


Sorry, only registered users may post in this forum.