Upgrade WampServer changes localhost back to WampServer homepage
Posted by: darthpathos42 (---.dsl.bell.ca)
Date: October 20, 2022 05:12PM

Hi all,

I'm trying to get a major upgrade done on our webserver and have run the WampServer upgrade (3.1.9 -> 3.2.9) - everything runs successfully but now [localhost] takes me to the WampServer homepage rather than my website. I have not upgraded anything else and have verified all the VC++ Redistributables are installed.

I'm currently on Windows Server 2012R2 (moving to 2019 but wanted to upgrade WampServer first).

What the heck am I missing?

Chris

Options: ReplyQuote
Re: Upgrade WampServer changes localhost back to WampServer homepage
Posted by: Otomatic (Moderator)
Date: October 20, 2022 05:42PM

Hi,

'http://localhost/' is and has always been the home page of Wampserver since the beginning.

If it became your own page, it means that you changed something.

For your local sites you have to use the VirtualHost, as with all hosting companies.

See:
The need for Virtual Host
and
Wampserver 3 - Create or add a VirtualHost

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 10/20/2022 06:10PM by Otomatic.

Options: ReplyQuote
Re: Upgrade WampServer changes localhost back to WampServer homepage
Posted by: darthpathos42 (---.dsl.bell.ca)
Date: October 20, 2022 06:35PM

Thanks @Otomatic -

I have followed the steps in the documentation you provided and not able to get it to work.

When I go to /httpd-vhosts/ I see:

<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

which looks correct - the site's files are all in the C:/wamp64/www folder.

I'm also seeing this:

Warning: Invalid argument supplied for foreach() in C:\wamp64\www\add_vhost.php on line 1065

When I try and add the vhost (Virtual Host Name - apptest Path - c:/wamp64/www as in the page's instructions.

Any further help would be appreciated.
Chris

Options: ReplyQuote
Re: Upgrade WampServer changes localhost back to WampServer homepage
Posted by: Otomatic (Moderator)
Date: October 20, 2022 07:28PM

Hi,

> which looks correct - the site's files are all in the C:/wamp64/www folder.

The problem is there, your files should not be in the folder c:/wamp64/www/ which is reserved for Wampserver, but either in another folder itself in www, for example c:/wamp64/www/mysite/ or in any other folder on your disk such as c:/www/mysite/ and it is the definition of the VirtualHost which creates the relation between the name of your local site (ServerName) and its localization on the disk (DocumentRoot)

Read again the two links I gave you before.

For information, the only files that can be in c:/wamp64/www/ are :
add_vhost.php
favicon.ico
index.php
test_sockets.php
testmysql.php
any other must be only folders.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.