Problems setting up Virtual host
Posted by: ultrajounin (63.88.33.---)
Date: January 06, 2012 05:54PM

I did some searching around and thought I found the solution to my problem but I think I need a little more help.

Right now we have a functioning intranet site running in our environment. We would like to add a new URL used for our users to use instead of the localhost name. Current URL is a bit ugly: [serverfqdn]

We recently had a new domain name entered into our DNS App.domain.com.

This is my first time using wamp/apache (I'm used to IIS) and tried using named based virtual hosts but I keep getting page cannot be displayed when accesssing app.domain.com

I ran httpd -S and it said my syntax was OK so I am a little lost on what I am missing.

Our site is located in the directory C:\wamp\www\App_1.6\App\source
The 'index' file is login.php

Here is my httpd-vhost.conf (and I made sure to uncomment it in the httpd-conf)

NameVirtualHost *:82

#
# 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 *:82>

DocumentRoot "C:\wamp\www\App_1.6\App\source"
ServerName App.domain.com

<Directory C:\wamp\www\App_1.6\App\source>
DirectoryIndex login.php
Options None
AllowOverride all
Order allow,deny
Allow from all
</Directory>


</VirtualHost>

Any help is greatly appreciated!

Options: ReplyQuote
Re: Problems setting up Virtual host
Posted by: stevenmartin99 (---.b-ras1.srl.dublin.eircom.net)
Date: January 06, 2012 06:29PM

Whats the reason for port 82?

if you want ill take a look using teamviewer? cos you should get those errors, the code seems ok


but anyway you need to set up a vhost for localhost too

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 01/06/2012 06:33PM by stevenmartin99.

Options: ReplyQuote
Re: Problems setting up Virtual host
Posted by: ultrajounin (63.88.33.---)
Date: January 06, 2012 06:38PM

Reason: This site was built and maintained by another developer/admin who is no longer here. He had placed the site on a different server where 80 was already in use and ended up (cringe) hard coding :82 in.

I sincerly appreciate the offer with teamviewer but I would end up getting fired if I allowed it smiling smiley So no can do.

Any other info I can provide from my end to help clarifly things?

Options: ReplyQuote
Re: Problems setting up Virtual host
Posted by: stevenmartin99 (---.b-ras1.srl.dublin.eircom.net)
Date: January 06, 2012 06:52PM

<Directory C:\wamp\www\App_1.6\App\source>

should be

<Directory "C:\wamp\www\App_1.6\App\source">

but i dont think it would cause a bug unless the path had a space in it

..other then this..
you did add the domain and ip to the windows host file yes?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Problems setting up Virtual host
Posted by: ultrajounin (63.88.33.---)
Date: January 06, 2012 07:20PM

You made a comment about setting up a vhost for the localhost - can you elaborate?

I added the domain/ip to host file previously but it didnt make a difference so I reverted back (I did this on the server itself).

I also check error and access logs and nothing regists for app.domain.com.

Thinking outloud... app.domain.com points to the ip address of the server, so the assumption is that its listening on 80 right? But the way I setup my vhost says anything on that ip but port 82 should be that url?

Not sure why I cant figure this out but its driving me nuts.

Options: ReplyQuote
Re: Problems setting up Virtual host
Posted by: ultrajounin (63.88.33.---)
Date: January 06, 2012 07:24PM

One other small note, from the wamp icon/taskbar if click on 'localhost' or 'myphpadmin' it takes me to [localhost] which gives me "Internet Explorer cannot display the webpage"

Options: ReplyQuote
Re: Problems setting up Virtual host
Posted by: watson88 (119.155.24.---)
Date: January 09, 2012 07:39AM

Thanks a lot i was searching for this for very long time, actually i recently join this forum and i hope got lot of such useful information in future.

High School Diploma

Options: ReplyQuote
Re: Problems setting up Virtual host
Posted by: yfastud (Moderator)
Date: January 14, 2012 07:26PM

No matter within or outside LAN access, you need to setup Access, DNS, and VH; Access for permission to connect to your Wamp PC, DNS to tie Domain(s) to your Wamp PC, and VH to host multiple Domains/Websites/IP's and even you have only 1 Domain/IP, you should use VH to set it up w/ the site you want to show up first on top and localhost on bottom and others in middle if having more than 1 site; w/ VH, other PC's, no matter w/i or outside LAN, can access/see websites/contents of that particular folder set for that particular VH on your wamp PC. If dont have real Domain, just skip DNS guide

To setup Access, follow this
[blog.jlbn.net]

To setup VH, follow this
[blog.jlbn.net]

To setup DNS, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.