Re: configuring vhosts and phpmyadmin
Posted by:
SimonT
(---.lightspeed.stlsmo.sbcglobal.net)
Date: June 19, 2016 01:01AM
This is a very long reply - if you decide to follow my suggestions, as creating virtual hosts, print this out so you can refer to as you go through the steps.
----
You should start from scratch creating virtual hosts. Too many things have been changed, too many types of errors have occured - trust me, after 42+ years in data processing, I know that there are times when it is best to get a clean start on a problem and this is one of those times.
Make a backup copy of the C:/wamp/bin/apache/apache2.4.17/conf/extra/httpd-vhosts.conf file
- If you have the 64 bit version of WAMP installed, it may be at C:/wamp64/bin/apache/apache2.4.17/conf/extra/httpd-vhosts.conf instead of C:/wamp
Also backup any other files, anywhere, you have modified during your efforts to create virtual hosts and getting them working.
If what I suggest does not work, you can restore the backup copies of these files and be back where you started before you tried what I will suggest you try, below.
Backup, Backup, Backup - always backup anything before you change it, whether a file or a program open via a menu.
Did you backup the files you were going to change before you began creating virtual hosts - I doubt it but had you done so, you could have restored the files and been back to where you were before you started making virtual hosts and could have tried again, with a "clean slate."
It is always necessary to have a way to get back to the state of things before you make any changes, no matter how small the changes may seem to you - particularly when working with files or systems of which you have limited knowledge, such as WAMP, the virtual hosts file, etc.
Far better to make too many backups than not enough or none at all. You can always delete backups when you are absolutely sure you want need them.
So, backup the fies and then remove all the changes and additions you put in the virtual host file and in any other files, anywhere you made when creating virtual hosts or working on the problems.
Get things back to the way their were before you took even the first step to create a virtual host.
If need be, "drop back and punt" and un-install WAMP and re-install it, whatever it takes to get back to the exact state everything was in when you started to create virtual hosts. If make sure you save any files - such as web site files - you created in any directories under the WAMP root.
*** What I am going to suggest only applies to WAMP 3. Earlier versions do not have the automated virtual host creation function. You can find out what version of WAMP is installed by right clicking the WAMP icon and then clicking About...
If you are not on WAMP 3, I suggest you consider installing the latest version.
You want to get back to the point where you have no virtual hosts of your own showing on the WAMP virtual host menu --- left click the WAMP icon and then click the Virtualhost menu item -- hovering over thh Virtualhost menu item should also open the virutal host list.
If you can't get rid of virtual hosts that are shown there, use different virtual host names in the following procedure, don't try to use duplicate names, it isn't going to work.
--------
After you have put the files back they way they were, do the following:
Shut down WAMP - right click the icon, click exit.
Restart WAMP and wait for the icon to turn green.
Create you virtual hosts using the facility built into the latest versions of WAMP:
If you are running WAMP 3, you can make a virtual host very easily. Go to this post and read it [forum.wampserver.com]
Here are the steps described differently:
1 - You must know the complete path to the web site. If it is stored under say, C:\wamp\www\mywebsite - that is the complete path, the path you would use to access the site's file via, for example, Windows Explorer.
2 - You must choose a virtual site name - like mywebsite.com
3 - Left click the WAMP icon in the Windows system tray (the right hand side of the Windows taskbar).
4 - Click Localhost in the menu that appears which you click the WAMP icon.
5 - The "Localhost" (I think of it as the WAMP local "home" page) page will be opened in your browser.
6 - On the left hand side, almost at the bottom, you will find a section titled "Tools", under that will be a link titled "Add a Virtual Host" - click that link.
7 - The "Add a VirtualHost" page will open. There are two text boxes on the window which you must fill in correctly.
8 - The first one is where you put the name of the virtual host, the "domain name" if you like. If you want to be able to enter mywebsite.com in the browser address bar to get to your site, then type mywebsite.com into the box on the Add VirutalHost window.
9 - The second text box is where you put the full path to the web site. Enter it as I discussed in step #1
10 - Click the very wide button labeled "Start the creation of the VirtualHost (May take a while...)" , located at the lower right hand corner of the Add Virtualhost window and wait.
11 - If the virtual host is successful a new window will open telling that and telling you that you need to restart the DNS. Do so by right clicking the WAMP icon, click Tools, and then Click Restart DNS -- it is the topmost menu item. Wait for the WAMP icon to go to red, then orange, and back to green and your virtual host should be ready for use.
If the vitural host is not successfully created, I assume some message will be displayed - I don't know because the operation has never failed the several times I've used it.
Once the virtual host is created, you can go to the site by typing, using the example, mywebsite.com OR you can go there via the WAMP icon - left click the icon, click Your Virtualhosts and then click the one you want to access.
******************* REMEMBER - the "automated" method of creating virtual hosts is ONLY available on WAMP 3 or higher.
If you are running an older version, I strongly suggest you consider install in WAMP 3. As I understand it, you have to uninstalled earlier versions before installing version 3 but I've installed 3 on this system to start with.
================ SOMETHING you should remember whenever reading posts or WAMP documentation: the good folks (such as the moderator) who created WAMP, keep it up to date, and post answers here are French and their English ma at times be a bit confusing to a person whose spoken language is English. You need to read carefully and consider that they may be saying something in a different way than you might expect.
Their English is better than my French, I can maybe make out 10% of a menu in French but they use English very well. Keep in mind it is the second or third, or fourth language - they may know other languages besides French and English.
I took Spanish in high school but I only remember perhaps 0.5% of what I learned, or thought I learned.
Remember that these people are using English as a second language and read their replies, documentation, and text on the various WAMP web pages with that always in mind.