localhost/<project> not working
Posted by: rosede (---.om.om.cox.net)
Date: September 22, 2015 08:20PM

I just recently installed wampserver 2.5. I can enter "localhost" in my browser and I can see the section with all of my "projects". However, if I select one of the projects, the localhost drops off of the URL, and only the project name appears in the address bar and I get an error "Web page is not available". I have to select the URL, and manually reenter localhost/<project>/.

Is there someway that I can configure this to always have localhost/<project> in the address bar so I don't always have to manually reenter localhost?

Thank you.

Daryl

Options: ReplyQuote
Re: localhost/<project> not working
Posted by: rosede (---.om.om.cox.net)
Date: September 22, 2015 11:35PM

I went through the virtualizing projects tutorial. I now understand why the localhost/<project> is no longer working. However, now when I enter localhost in the address bar, it takes me to the first project. I no longer have the wampserver main page. What do I need to do to get that back?

Thank you.

Daryl

Options: ReplyQuote
Re: localhost/<project> not working
Posted by: RiggsFolly (---.as43234.net)
Date: September 23, 2015 02:00AM

You had better show us your httpd-vhost.conf file. Nobody here is clairvoyant.

---------------------------------------------------------------------------------------------
(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: localhost/<project> not working
Posted by: LAVenetz (---.dclient.hispeed.ch)
Date: September 23, 2015 09:28AM

Good morning everybody!
Since I have the same problem, here is my httpd-vhost.conf or better what I have changed:

# 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/wordpress"
ServerName wordpress
<Directory "c:/wamp/www/wordpress">
AllowOverride All
Require local
</Directory>
</VirtualHost>


What I can do is to call the links "[localhost"]; (WAMPSERVER Homepage) and "[localhost]; (my Blog). So, I would be glad to hear from you, because I followed exactly the guidance of link [forum.wampserver.com]

PS: What do I have to do to make my WordPress online? (I have already a functional test domain with webserver (my Testblog) and functional Mail Server. Can I Redirect ports 80 and 443 to my WAMPServer only? Where do I get guidance for this topic?

Regards, LAVenetz

Options: ReplyQuote
Re: localhost/<project> not working
Posted by: LAVenetz (---.dclient.hispeed.ch)
Date: September 23, 2015 10:19AM

An addition: I can call Wordpress through the menu "My Virtual Hosts" -> "wordpress". It is working somehow over the menu but not over the WAMPSERVER Homepage -> Your Projects -> wordpress (there is now a little symbol like a letter).

Options: ReplyQuote
Re: localhost/<project> not working
Posted by: RiggsFolly (---.as43234.net)
Date: September 23, 2015 10:32AM

Ok so what is in your HOSTS file. C:\windows\system32\drivers\etc\hosts


It should have

127.0.0.1  localhost
::1  localhost

127.0.0.1  wordpress
::1  wordpress

It is this that tells windows that there is a domain called `localhost` and `wordpress`. Without this windows has no idea that these domains exist.

---------------------------------------------------------------------------------------------
(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: localhost/<project> not working
Posted by: LAVenetz (---.dclient.hispeed.ch)
Date: September 23, 2015 10:40AM

Here is my 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 wordpress

Options: ReplyQuote
Re: localhost/<project> not working
Posted by: RiggsFolly (---.as43234.net)
Date: September 23, 2015 11:00AM

Well change it to look like I suggested

---------------------------------------------------------------------------------------------
(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: localhost/<project> not working
Posted by: LAVenetz (---.dclient.hispeed.ch)
Date: September 23, 2015 11:12AM

Thanks a lot! It works fine.

Options: ReplyQuote
Re: localhost/<project> not working
Posted by: rosede (---.om.om.cox.net)
Date: September 24, 2015 04:15AM

I see what I did wrong. I read the conversation with LAVenetz, and I realized that I failed to put a "localhost" virtual host in the httpd-vhost.conf. Now when I enter "localhost" in the address bar, I get the locahost page.

I have a couple of follow up questions.

I put my projects on a separate drive. I have a small OS drive, but I have a pair of 2TB data drives. Following the "virtual host" instructions, I moved all of my projects to the data drive. Now when I click on "My Projects" in the wampserver menu, nothing appears. When I click "www directory" it takes me to c:\wamp\www. I would like it to take me to d:\wamp\www.

How can i populate "My Projects" and have "www directory" take me to the new location?

Thank you.

Daryl

Options: ReplyQuote
Re: localhost/<project> not working
Posted by: RiggsFolly (---.as43234.net)
Date: September 24, 2015 11:41AM

Hi Rosede,

You cannot copy the \wamp folder from drive to drive. There are lots of files that have the drive letter pre configured by the installation.

The idea with Virtual Hosts is that you can move all your site code to any drive you like, but the \wamp installation stays where it was originally installed.


If you want all of WAMPServer to live on the D: drive then you have to install it on that drive.

If you want to do that I STRONGLY suggest you read this post so you do the new install without loosing anything you currently have on the existing install [forum.wampserver.com]

---------------------------------------------------------------------------------------------
(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: localhost/<project> not working
Posted by: rosede (---.dtn.com)
Date: September 24, 2015 02:46PM

RiggsFolly Wrote:
-------------------------------------------------------
> Hi Rosede,
>
> You cannot copy the \wamp folder from drive to
> drive. There are lots of files that have the drive
> letter pre configured by the installation.
>
> The idea with Virtual Hosts is that you can move
> all your site code to any drive you like, but the
> \wamp installation stays where it was originally
> installed.
>
>
> If you want all of WAMPServer to live on the D:
> drive then you have to install it on that drive.
>
>
> [forum.wampserver.com]


RiggsFolly,

Sorry, I did not explain myself correctly. I did not move "wamp" to the other drive, I only moved "www", my site code.

I originally did install wampserver on the data drive, but something didn't work right. I can't remember what off the top of my head, but I decided to reinstall wamp to the c drive, and moved only the www directory.

Thank you.

Daryl

Options: ReplyQuote
Re: localhost/<project> not working
Posted by: RiggsFolly (---.as43234.net)
Date: September 24, 2015 03:01PM

Ok Daryl,

Can I suggest that you move the `www` folder back to `\wamp\www`

Then using the Virtual Hosts idea you define each of your projects a being on `D:\` somewhere but leave all WAMPServer's file in www as delivered. Like so


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

<VirtualHost *:80>
   DocumentRoot "d:/websites/wordpress/www"
   ServerName wordpress.dev
   ServerAlias www.wordpress.dev
   <Directory "d:/websites/wordpress/www">
      AllowOverride All
      Require local
   </Directory>
</VirtualHost>

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