I am on my 4th day and 8th reinstall of wampserver64 in an attempt to create a virtual host.I have read and reread the wampserver forum discussions and googled the subject and am at a complete loss how to set up a virtual host so that I can install old website filesand redo them.
Wampserver is installed correctly. It has a green icon. I have created several virtual hosts but they all display only blank pages.
What is the difference between a virtual host and a “project”? What is the path I should be creating for a virtual host/a project?
Except for two instances in which I have php files these old site pages display correctly directly in my FF browser. I cannot run php or js without something like wampserver.
Can someone post screen shots of their explorer directory showing the paths that I should have to the virtual host folder, what the virtual host is named, and where my site files go in all this? Thank you!
A “project”, if I understand you correctly, is what you are working on in e.g. your editor and what your editor has saved the settings for together with the collection of directories and files belonging to the project. So there in no specific path other than your working directory.
A “virtual host” is a path to the project’s site in the wamp server directory set in your machine’s “hosts” file: http://nurelm.com/setting-up-a-virtual-host-with-xampp/
Please ask again if I missed something.
No screenshots available, don’t use Windows.
The Explorer path to the site is better explained here: https://www.sitepoint.com/multiple-websites-apache-virtual-hosts/
This is also the directory where all files the site uses goes. At least when you test the site locally. The project’s file paths could be the same with another path for backup, or the files could be copied to the site directory for testing.
Thank you for trying, Erik. The guide you referred me to is actually more complicated than what wampserver 3.08 now makes it. Wampserver createds a local host for me and then has a button to open a screen to use to create a Virtual Host. I still do not understand.
In this directory what is my my VHost name for the wamp form?
What is the absolute path to the folder of the Virtual Host - How do I fill in the wampserver Virtual Host form? What is the address of my Virtual Host (it is not 127.0.0.1)?
Within Project.com I have folders for CSS, images, scripts and individual html files. The reason I did not simply continue creating a project under C:/wamp64/www/ is that I read that it messes up php when you try to take the project live because the directory root is messed up. Perhaps I have also misunderstood that also and/or should ask that seprately.
Thank you for trying to help, Erik. Trying to educate me in something so basic must be as hard as potty trining a two year old.
I missed that second source you referred to - the old Sitepoint discussion. The comments address the possible issue with going live. In the directory I poseted above, if I change the name of “Project.com” to my actual domain name, will that take care of php which will be created for a form that will be included in the site?
As I understand it, setting up a form locally is rather tricky and requires some extra steps (setting up mail sending facility from your local computer or something). To keep it simple, I’s suggest testing the form script online and not worrying about all this extra setup.
I use MAMP on Mac, and found some great resources years ago which showed me how to set up MAMP as a root server. If you get to this point, all your local and remote file paths are the same, which is really nice.
I did have a link to an equivalent setup for XAMPP, but it seems to be dead now, although here’s a forum post that discusses it: Xampp/virtual hosts - #9 by maya90
At one point a few years ago I succumbed to the temptation to grab MAMP Pro, because setting up these things is supposed to be automatic. But to be honest, I was so confused I dumped MAMP Pro and went back to setting it up as I knew how. (I honestly don’t think it was able to replicate the manual setup.) The screen shot you posted reminds me of that horrible experience.
Your anecdote allowed me a slight amusement after a grim eight days of frustration!
I may have to test the form script livebut a major appeal from wampserver was localhost testing.
I have continued flailing about and managed to to get the old site (without scripts) working on Virtual Host, I think. However, both my VHost and project are called “project.com” which I don’t think is correct, nor do I remember for sure which path from C:/ worked - I have three attempts that include project.com with all the subfiles and folders. I may discover the answer as I change and update the filesthat do work on VHost. Maybe I can even do scripting with a possibility that it would work Live.
I wish I could understand what I am doing and why but I may have to settle for being grateful it works.
I think this automagic “wamp virtual hosts form” is just as complicated as the manual configuring would be.
The form fields:
VirtualHost name: project.co1
I suggest you could actually use the live domain name with a nonexisting top-level of the same lenght as the live site, like “domainname.co1” for the actual domain “domainname.com”.
VirtualHost folder path: c:/wamp64/www/project.co1/
That’s the same path as you see in Explorer. That is also the directory to copy all files that belongs to the site and what you then transfer to the live site.
For an easy workflow I would prefer to make the virtual host directory to also be the project directory in the editor. (And then create another dir in my working space for project backups.)
The VirtualHost IP is normally not necessary, but as the form suggests you can choose any IP format number that starts with 127 (except the localhost number: 127.0.0.1).
Hopefully you can set it up as you wish and have all dev tools working together.
What editor do you use?
Another way to test email forms on localhost is to use something like PHPMailer rather than the PHP mail() function. I found it a lot easier than setting up a local mail server.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.