Win8.1 x64 Vhosts - Not gonna happen
Posted by: awfulmess (---.sub-75-214-155.myvzw.com)
Date: September 22, 2015 10:37PM

Win8.1 x64 touch
hp 15 touchsmart laptop
firefox 40? I think
Wamp 2.5 Green Light


I have done the tutorial. I am here to verify that vhosts does not work on this setup. It can not work on this setup and that the culprit is 1000% Apache design flaws. (as usual)

My system works perfectly
My wamp works perfectly

The end result of this tutorial (tried wamp official, and 2 other sources) is you WILL have 3 sites or 2 if that's all you created. And they will ALL resolve to localhost but under their respective names. Effectively all you have done is rename localhost. i.e. site1 pulls up the localhost projects ect ect.

Have an index.php in both of my "new sites"...waste of time. As if it doesn't exist.
If you create "site1" inside wamp/www...you now have an infinite loop...good luck!
Go to localhost...click on site1 folder under projects and now localhost will open named as site1. PLEASE, feel free to click on the site1 folder that is now in SITE1.


Gentleman...the entire desire here was to do things as you now deem "proper". But my machine is not designed to be compliant with your "wishes". The point of attempting to follow your guidelines was in the hope that it would put distance between ANYTHING I work on and the Apache server.

Reason for using apache since I obviously hate it? GoDaddy, MySQL

Also, the Symfony create your own framework tutorial requires you to be able to reasign the root. Personally I think that is not wise..but whatever. Thus the need for Vhost.


I would ask a simple short question....but when dealing with Apache...what question to ask precisely???
Check Apache log...no errors to report! Tip top! Nothing malfunctioning at all!!!

Here are the MS hosts file and the apache vhosts file so you can inspect their pecision.

The ONLY inperfection I have seen is that, on my setup, net start dnscache is completely unnecessary as MS will restart the cache for you automatically. I had wamp stopped and turned off my hotspot so it wasn't that.

Not expecting a solution, expecting a revision...from Apache. The tutorial was written perfectly and executed perfectly. This leaves only Apache's bug ridden software to blame!!!

Here are my files for your inspection and ultimate affirmation.


http-vhosts file

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:[httpd.apache.org];
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "c:/wamp/www/site1"
ServerName project1
<Directory "c:/wamp/www/site1">
AllowOverride All
Require local
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "c:/site2"
ServerName project1
<Directory "c:/site2">
AllowOverride All
Require local
</Directory>
</VirtualHost>



MS hosts file

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for

Windows.
#
# This file contains the mappings of IP addresses to host

names. Each
# entry should be kept on an individual line. The IP address

should
# be placed in the first column followed by the corresponding

host name.
# The IP address and the host name should be separated by at

least one
# space.
#
# Additionally, comments (such as these) may be inserted on

individual
# lines or following the machine name denoted by a '#'

symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source

server
# 38.25.63.10 x.acme.com # x client

host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 site1
127.0.0.1 site2


::1 localhost
::1 site1
::1 site2

Options: ReplyQuote
Re: Win8.1 x64 Vhosts - Not gonna happen
Posted by: RiggsFolly (---.as43234.net)
Date: September 23, 2015 01:57AM

There is a simple rule I find usful in these situations: If 1,000,000 other people are using Apache quite successfully, but it wont work for me. Then its almost always something I have done wrong!


Here are some obvious mistakes I spotted.
Your Virtual Host definitions for `ServerName do not match your HOSTS file definitions for the domain names, they match the folder name!!!


Your Virtual host definitions

<VirtualHost *:80>
   DocumentRoot "c:/wamp/www"
   ServerName localhost
   ServerAlias localhost
   <Directory "c:/wamp/www">
      AllowOverride All
      Require local
   </Directory>
</VirtualHost>

<VirtualHost *:80>
   DocumentRoot "c:/wamp/www/site1"
   ServerName project1
   <Directory "c:/wamp/www/site1">
      AllowOverride All
      Require local
   </Directory>
</VirtualHost>

<VirtualHost *:80>
   DocumentRoot "c:/site2"
   ServerName project2
   <Directory "c:/site2">
      AllowOverride All
      Require local
   </Directory>
</VirtualHost>

Now you need a HOSTS file with references for `project1` and `project2` not `site1` and `site2`

HOST File
For starters remove all the duplicates so it shoudl look like this

127.0.0.1 localhost
::1 localhost

#project1, not site1
127.0.0.1 project1
::1  project1

#project2, not site2
127.0.0.1 project2
::1 project2


It may have been simpler to use a folder name of `c:/project1` and `c:/project2` to match the domains of `project1 and `project2`

Also its useful to put a project in a folder that somewhat matches the directory structure of a live hosting site so I would use

`c:/wamp/www/project1/www` and `c:/project2/www`

So if I were you I would use this Virtual Host definitions file

<VirtualHost *:80>
   DocumentRoot "c:/wamp/www"
   ServerName localhost
   <Directory "c:/wamp/www">
      AllowOverride All
      Require local
   </Directory>
</VirtualHost>

<VirtualHost *:80>
   DocumentRoot "c:/wamp/www/site1/www"
   ServerName project1
   <Directory "c:/wamp/www/site1/www">
      AllowOverride All
      Require local
   </Directory>
</VirtualHost>

<VirtualHost *:80>
   DocumentRoot "c:/site2/www"
   ServerName project2
   <Directory "c:/site2/www">
      AllowOverride All
      Require local
   </Directory>
</VirtualHost>


Oh and a useful bit of knowledge: When the Virtual Host definition is wrong or does not match any domain name. Apache will default to the first VH defined, which shoudl normally be localhost.

---------------------------------------------------------------------------------------------
(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-



Edited 1 time(s). Last edit at 09/24/2015 11:50AM by RiggsFolly.

Options: ReplyQuote
Re: Win8.1 x64 Vhosts - Not gonna happen
Posted by: awfulmess (---.sub-75-214-176.myvzw.com)
Date: September 24, 2015 09:16AM

hahaha Look at this point I have to laugh...or throw my laptop out a window!! haha

Agreed - project1/www Good Idea
Agreed - Server name and the project folder should also match for ease of use
(originally thats what I had had. By 5:30 AM when I finally copy and pasted yours and started to change to site1/site2 I missed the obvious server name.)

This is evident in something we BOTH missed. In your updated version project1 is listed twice, cause I copied and pasted and then modified accidentally skipping the servername due to fatigue.

What wasn't my mistake, which obviously I can't evidence, is the 1/2 dozen times I copied and pasted correctly. Naming it site1 & site2 didn't come from me. Nor did the idea of putting it directly into C:\ as I priory thought that was not possible. Still not convinced it is.

I have copied and pasted the NEW files I have.
They look very pretty! Problem is not fixed, it's worse! Now it automagically triggers a yahoo search! hahaha

Personal aside - I like your logic of the one million to one. Unfortunately, apache doesn't qualify for that exemption. It doesn't count when you have ten million database engineers constantly posting to help 1/2 billion people who cant make the crap work on a daily basis. I wouldn't define that, nor having a near monopoly of the playing field as "qualifiers" for a good system. It only proves that without a BA in server technologies...I have no other choice winking smiley It's not a position I have to argue, Google is my friend on that front. Just as anyone making 100k by developing for Apache will tell you it's wonderful.

All that crap is moot and non productive.

So since we STILL have a problem. "What have I done wrong", "What have I FAILED to do this time?"

Problem restated: Now typing project1 or typing project2 into the url will yield a yahoo search.
Steps taken: vhost file modified prior to starting Wamp
hosts file modified - CMD opened as admin - net stop dnscache - net start dnscache (success messages both times) Closed and reopened hosts to verify changes saved. Anything else? Vhosts file was opened in notepad++ which visually tells me when I need to save a file so that is it's own verification of completion.

Edits - changed duplicate project1 server definition to project2. Removed site1/site2 references and replaced with project1/project2 references. Changed destination folders to project1/project2. Added /www folders to project1/project2. Inserted the index.php files into said www folders.

(change to files included with this message) Removed your commented out lines from hosts file, resaved, verified save, stop/start cache (success) removed index.php from project1. Still only localhost works. Others open yahoo search. Open project1 from localhost and www folder showed up in index of. Open that and an error relating to an improper hello world php I slammed in there and was too lazy to fix.

Type project1/www or project2/www and nothing is found. One has a php file inside and one does not.

Before sending this message - Double checked the localhost and there is still NO virtual hosts menu.
Honestly I DO hope you prove me wrong. What would I gain by being right in this situation??? seriously? But using the scientific method...title to this post still stands until such proof illuminates the situation.

UPDATE: After doing all this fooling around, many websites started loading very slowly. Wonderful. Luckily took CCLEANER and cleaned the registry. Shutdown hotspot in case of throttling. and waited 5 minutes. Good as new. So I tried my vhosts once again and noticed something i missed. (also changed default search engine to google) A small button in Firefox asks if I want to GO to project1 or project2. This of course is after initiating a search. Then it proceeds to take me to localhost under the selected vhost name.

Thanks for the response and the thoughtful help thus far. Regardless of my personality, It is appreciated.

Here's what I think is happening. At one point I did look for an alternative. Tried 2 things (this was a couple months ago) I tried EasyPHP. DON'T EVER try that program!!! Uninstall the program, fix admin environmental paths only to find them automagically reappear. Yeah, like that! I hammered the problem for 3 days before finally destroying their lock on my system and doing a successful restore. They even went so far as to have MS say system restore wasn't possible due to a damaged disk. Funny...MS tooks checked and called BS on that!!!!!

Around that same time I testdrove MS IIS. IF it wasn't for EasyPHP leaving ghosts that probably interfered with my IIS user experience and prevented me from creating my Wamp stack with their software, If not for that my suspicion would be IIS ghosts remaining as a dirty trick to bring me back to IIS and basically "accidentally" shut you and your software out, unbenonst to me. But then again system restore should've made that all but impossible. I went back way before either of those programs was installed. Something is saying your program can't do this on my machine. I just don't know what it is. Tinkering with apache usually leads to problems exactly like this. That's why I deliberately try to avoid things like vhosts, unfortunately now I need one. sad smiley I may just have to call Microsoft and see what they recommend for my machine, of which they're just going to recommend IIS once again...grrr. Do you make a Lamp product that I can put on my Mint17 laptop? At least then if I have a problem a Linux techy will advise me how to use the console to FORCE your program to comply with the machine's written COMMANDS! Something that's not advisable to do on a MS machine. sigh....


Hosts File
----------------------------------

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
::1 localhost

#project1, not site1
127.0.0.1 project1
::1 project1

#project2, not site2
127.0.0.1 project2
::1 project2




VHOSTS file
----------------------

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:[httpd.apache.org];
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
<Directory "c:/wamp/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "c:/wamp/www/project1/www"
ServerName project1
<Directory "c:/wamp/www/project1/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "c:/project2/www"
ServerName project2
<Directory "c:/project2/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>

Options: ReplyQuote
Re: Win8.1 x64 Vhosts - Not gonna happen
Posted by: RiggsFolly (---.as43234.net)
Date: September 24, 2015 12:13PM

I dont have the time to read these distribes.

Excuse my heinous crime of missing the domain name duplications. Guess what, it official, I am not perfect! It was afterall nearly 1am here when I answered your question.

If you would like to get this working I can offer you a TeamViewer session, so I can actually see what is going on on your PC.

If this is acceptable, install TeamViewer on the PC running WAMPServer. It's free for occasional use. TeamViewer
If you dont want the full install click the "Join Remote Control Session" link on that page and it will download an .exe only that you can run and then delete if you dont want TV left on your computer.

Once installed, send me a Private Message with the ID and PASSWORD that TV shows you on its initial windows. Leave it running until I connect as the password will change each time you run it.


If you want to organise a time for our connection, I am in a GMT+1 timezone and normally available 09:00 - 16:00 and often 20:00 to late into the evening.

Allow an hour for us to get this sorted, it may well not take that long, but just in case there are complications and hour should do it.

I will not connect unless you are there to watch what I am doing as I have no wish to be blamed for every i'll that may exist on your PC. I do not do anything to your PC without your permission, also why you need to be there during the connection. I only mention this as some have suggested I just connect and fix it, while they go off to whereever.

---------------------------------------------------------------------------------------------
(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
Re: Win8.1 x64 Vhosts - Not gonna happen
Posted by: RiggsFolly (---.as43234.net)
Date: September 25, 2015 10:16AM

You have gone very quiet for a person who normally has so much to say ??????

---------------------------------------------------------------------------------------------
(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
Re: Win8.1 x64 Vhosts - Not gonna happen
Posted by: awfulmess (---.sub-75-214-222.myvzw.com)
Date: September 27, 2015 04:34AM

Oh I'm still here. Been busy, trying to resolve a perplexing code problem. Yeah, I talk alot...salesman by trade. Yes, your not perfect as neither am I, great wonderful now we're on even ground.

As referenced in prior consideration, I've now officially scraped all plans to test/implement Symphony or any of it's dependent "children". Also, not mentioned, I have begun initial inquiry into Postgresql, and occasionally look at ssjs. NoSQL's may make hierarchical functions easier...to be cont'd

Bottom line: The "critical need" for your vhost has expired and is back to it's rightful 2% problem status. This need should've eroded 30 minutes into this nightmare. 3 days and sleepless nights later I realized that all of this, along with my dialog is truly pointless. Figuring out Apache's functionality problems will never make me a dime....so if your that determined to defend those pieces of (bleep)...knock yourself out, have a ball all with my blessing. As a matter of fact "POOF"...it's a miracle...problem just disappeared a microsecond ago...feel better now? God damn! Your offer is deeply appreciated but no longer required.

Since you gave me a quality mantra at the beginning of all of this, let me return the favor and close the thread with one. This, like the majority of my remarks is directed soley at Apache and NOT YOU. (shakes head) This has served me well.
Mantra: If users are doing silly/annoying things - the system is doing silly/annoying things FIRST! (people like to blame the user when their own convoluted setup/architecture is usually to blame) That is a business/user standpoint...NOT a developer one. You don't have to agree.

Here endith the lesson......

Options: ReplyQuote
Re: Win8.1 x64 Vhosts - Not gonna happen
Posted by: Otomatic (Moderator)
Date: September 27, 2015 10:04AM

Hi,

Please, stop these sterile speeches that have nothing to do with WampServer.
Once harange like this, and all your messages will be deleted.
I close this discussion.
If you have a problem in relation Wampserver, please open a new thread.

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

Options: ReplyQuote


Sorry, you can't reply to this topic. It has been closed.