Projects load http//sitename Not http://localhost/sitename
Posted by: LeMarque (---.albq.qwest.net)
Date: February 01, 2015 03:21AM

Win7 64bit Wamp 2.5 32bit Apache 2.29 PHP 5.5.12 MySQL 5.6.17

Clean install of Wamp. Followed these directions:

[forum.wampserver.com]

Two sites; one Joomla 2.8x (hdd) and the other 3.3x (newhdd)


When the Wamp server home page loads and I click on one of my two sites in Projects a new window opens another Wamp server home page with, for instance, [hdd], in the title bar. Changing it to [localhost], loads the site.

Also, when the Wamp server home page loads I see the Projects menu but not the 'My Virtual Hosts' menu.

And one last thing. you will notice in The httpd-vhosts.conf file, I removed the entry for "ServerAlias" for the "hdd" (Joomla 2.8x) site, because if I have the server alias listed the css gets munged and the site doesn't display correctly. It does display correctly for the 3.3x version site with the ServerAlias.


Hosts file
=======================

127.0.0.1 localhost
::1 localhost

127.0.0.1 localhost
127.0.0.1 hdd

::1 localhost
::1 hdd

127.0.0.1 localhost
127.0.0.1 newhdd

::1 localhost
::1 newhdd

===========================================




The httpd-vhosts.conf 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/hdd"
ServerName localhost
<Directory "c:/wamp/www/hdd">
AllowOverride All
Require local
</Directory>
</VirtualHost>

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

=====================================================================================

The part of wampmanage.tpl

[Menu.Left]
;WAMPMENULEFTSTART
Type: separator; Caption: "Powered by Alter Way"
Type: item; Caption: "${w_localhost}"; Action: run; FileName: "${c_navigator}"; Parameters: "[localhost];; Glyph: 5
;WAMPPROJECTSUBMENU
;WAMPVHOSTSUBMENU

==========================================================================================================================

The httpd.conf part

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

Options: ReplyQuote
Re: Projects load http//sitename Not http://localhost/sitename
Posted by: RiggsFolly (---.as43234.net)
Date: February 01, 2015 04:23PM

Hi LeMarque

Couple of corrections for you


First the HOSTS file, removing some unnecessary duplications should look like this

127.0.0.1 localhost
127.0.0.1 hdd
127.0.0.1 newhdd

::1 localhost
::1 hdd
::1 newhdd



Now the Virtual Hosts definitions, I am guessing most of these are just typos, or maybe you just didnt understand the tutorial


<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/hdd"
   #ServerName localhost                            <-- error
   ServerName hdd
   ServerAlias www.hdd
   <Directory "c:/wamp/www/hdd">
      AllowOverride All
      Require local
   </Directory>
</VirtualHost>

<VirtualHost *:80>
   DocumentRoot "c:/wamp/www/newhdd"
   #ServerName localhost                            <-- error
   ServerName newhdd
   ServerAlias www.hdd
   <Directory "c:/wamp/www/newhdd">
      AllowOverride All
      Require local
   </Directory>
</VirtualHost>


Now you dont need the changes to the wampmanager.tpl file.

---------------------------------------------------------------------------------------------
(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: Projects load http//sitename Not http://localhost/sitename
Posted by: LeMarque (---.albq.qwest.net)
Date: February 01, 2015 05:24PM

Thanks RIggsFolly -

How I missed that (?)

However, with serveralias for hdd (Joomla 2.5x) the sites css still doesn't display properly. Without the serveralias, alls well.

Options: ReplyQuote
Re: Projects load http//sitename Not http://localhost/sitename
Posted by: LeMarque (---.albq.qwest.net)
Date: February 01, 2015 08:53PM

errr...

never mind - for now ;-)

refreshed and restarted Apache again and the css seems to be playing well now.


Thanks again

Options: ReplyQuote


Sorry, only registered users may post in this forum.