Clicking virtual host link opens Wampserver page
Posted by: jeffbiss (---.try.wideopenwest.com)
Date: May 18, 2020 10:28PM

I did search for this and found nothing, if it's here somewhere, my search terms were probably wrong, sorry in advance. No error messages, all else works fine, no problem with PHP, mySQL, etc.

Questions:
8. yes
8a. no
9. yes
10. NA
11. webroot
12. C:\wamp64
13. see below

I have three virtual hosts. When I click on two of them, CustomerSupport.local and CustomerSupport2.local, their windows open. When I click on the third, AJAXForBeginners.local, the Wampserver localhost web page is opened, which is the problem.

As far as I can tell, all are set up correctly in both the Windows hosts file:

127.0.0.1 CustomerSupport.local
127.0.0.1 CustomerSupport2.local
127.0.0.1 AJAXForBeginners.local

::1 CustomerSupport.local
::1 CustomerSupport2.local
::1 AJAXForBeginners.local

and the httpd-vhosts.conf file:

#
<VirtualHost *:80>
ServerName CustomerSupport.local
ServerAlias CustomerSupport
DocumentRoot "c:/wamp64/www/customersupport"
<Directory "c:/wamp64/www/customersupport/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


#
<VirtualHost *:80>
ServerName CustomerSupport2.local
ServerAlias CustomerSupport2
DocumentRoot "c:/users/jbiss/documents/netbeansprojects/html5application/public_html"
<Directory "c:/users/jbiss/documents/netbeansprojects/html5application/public_html/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

#
<VirtualHost *:80>
ServerName AJAXForBeginners.local
ServerAlias AJAXForBeginners
DocumentRoot "c:/wamp64/www/ajaxforbeginners"
<Directory "c:/wamp64/www/ajaxforbeginners/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


When I either click on index.html in that directory or select it from the "Open" window, its web page opens, not the Wampserver web page.

Any idea why the AJAXForBeginners.local virtual host displays the Wampserver page and not the index,html in the directory indicated by DocumentRoot setting shown above?

NOTE: I get no error in the access.log file for this problem. I verified that it does indicate a new current error by clicking on a link that fails and the following is generated:

::1 - - [18/May/2020:15:19:13 -0500] "GET /CustomerSupportSS.css HTTP/1.1" 200 523
::1 - - [18/May/2020:15:19:21 -0500] "GET /10Dobsonian/FinderAssy.php HTTP/1.1" 200 726
::1 - - [18/May/2020:15:19:21 -0500] "GET /10Dobsonian/images/expl_finder.gif HTTP/1.1" 200 4030
::1 - - [18/May/2020:15:19:23 -0500] "GET /10Dobsonian/_FinderAssy.html HTTP/1.1" 404 323

NO error is generated when I click on either the localhost or AJAXForBeginners.local virtual hosts the following is generated:

::1 - - [18/May/2020:15:22:35 -0500] "GET / HTTP/1.1" 200 5946 (for localhost virtual host)
::1 - - [18/May/2020:15:22:57 -0500] "GET / HTTP/1.1" 200 5946 (for AJAXForBeginners.local virtual host)



Edited 3 time(s). Last edit at 05/18/2020 11:07PM by jeffbiss.

Options: ReplyQuote
Re: Clicking virtual host link opens Wampserver page
Posted by: Otomatic (Moderator)
Date: May 19, 2020 07:44AM

Hi,

> [18/May/2020:15:19:23 -0500] "GET /10Dobsonian/_FinderAssy.html HTTP/1.1" 404 323

404 error - Page not found

Case 1 : page found OK : Dobsonian/FinderAssy.php HTTP/1.1" 200 726
Case 2 : page not found error : Dobsonian/_FinderAssy.html HTTP/1.1" 404 323

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

Options: ReplyQuote
Re: Clicking virtual host link opens Wampserver page
Posted by: jeffbiss (---.try.wideopenwest.com)
Date: May 19, 2020 04:47PM

Hello,

Those four examples at the bottom are to show that I do get valid errors, the link is broken due to me refactoring my project. The real problem is shown in the very bottom two examples.

However, after four tries this morning, wampserver accessed the correct web page! I did nothing different, just tried a few times. No configuration file changes, nothing, but now it works.

So, can anyone think why what I describe above might happen? Knowing this would help if it happens again.

Thanks, Jeff



Edited 1 time(s). Last edit at 05/19/2020 04:53PM by jeffbiss.

Options: ReplyQuote
Re: Clicking virtual host link opens Wampserver page
Posted by: Otomatic (Moderator)
Date: May 19, 2020 06:00PM

Hi,

Always remember to clear browser caches.
And don't forget that your scripts can also create caches.
Don't forget also that any PHP sessions are, by default, in the wamp(64)/tmp/ directory.

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

Options: ReplyQuote
Re: Clicking virtual host link opens Wampserver page
Posted by: jeffbiss (---.try.wideopenwest.com)
Date: May 19, 2020 10:13PM

Hello! Good points about caches, I had another cache problem that drove this home when I was seeing old text after I had updated a file. When I checked Chrome's Developer tools under Network I saw that a cache was being used instead of the new file. Thanks for your help! Stay well.

Options: ReplyQuote
Re: Clicking virtual host link opens Wampserver page
Posted by: jeffbiss (---.try.wideopenwest.com)
Date: May 20, 2020 04:46PM

One more thing, maybe something about checking caches should be added to the Troubleshooting page (http://forum.wampserver.com/read.php?2,134915,134915#REPLY), even some things to try that seem silly, such as on a Windows computer to try Ctrl-F5 to force a reload of the source. Maybe what I experienced isn't a problem for most, but the cache issue wasn't obvious to me when I was looking at the system files.

Options: ReplyQuote
Re: Clicking virtual host link opens Wampserver page
Posted by: Otomatic (Moderator)
Date: May 20, 2020 05:47PM

Hi,

I think RiggsFolly will agree to add, as item 00 (i.e. at the very beginning of Troubleshooting Tips) :

00 - The page you want to load in the browser is "white" or it's not the page you called or it's the Wampserver homepage instead of your local homepage:
- In such cases, the first thing to do is to empty the browser cache, usually by Ctrl-F5, and possibly to do it several times in a row.

RiggsFolly will write this much better than my translation!

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



Edited 1 time(s). Last edit at 05/20/2020 05:47PM by Otomatic.

Options: ReplyQuote
Re: Clicking virtual host link opens Wampserver page
Posted by: RiggsFolly (Moderator)
Date: May 20, 2020 08:33PM

Hi Oto,

Always your willing and humble servant.

I can do, but:

I really dont see how a cache can cause a problem if you have never accessed the site before. In that case the cache would know nothing about the site/domain.

It is more likely that there was something wrong with the VH definition of the site you had problems with. If that is the case, the Apache fallback position is to show you the FIRST site in the VH Definition list. Which of course would be `localhost`.

Are you absolutely sure you didnt solve whatever this problem was (and having read your post I am still not sure what the issue really was) by doing something that you are not telling us?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

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


Sorry, only registered users may post in this forum.