...

View Full Version : virtual host on development environment



timgolding
01-09-2008, 03:21 PM
Hi,

I am trying to create a virtualhost for a development environment
We have a separate local server for all our developments. At present we have been putting new projects in new folders on the test server that would look like this



.
..
domain1.com
domain2.com


and hadn't set up any virtual hosts. I suggested we use virtualhosts because we are getting the problem in our sites where links arn't relative to the document root when we upload them to the live server. I have set up a virtual host on a real server but that was when I had domains pointing to the server. I'm not sure how do this when our development server
When we access our sites to test we would type



http://192.168.1.99/domain.com/


unfortunatley the document root would still be in htdocs and not in htdocs/domain.com/

If someone can help me replace the squiggly brackets following




<VirtualHost {vhost}>
DocumentRoot /Applications/MAMP/htdocs/domian.com
ServerName {domain.com}
</VirtualHost>


Any ideas?

abduraooft
01-13-2008, 11:47 AM
I believe, after setting up a virtual host, we can access it by just typing www.example.com
1. Configuring 'httpd-vhosts.conf' file
path:
\apache\conf\extra\httpd-vhosts.conf


ServerName www.example.com
DocumentRoot "C:/XAMPP/htdocs/mysitefolder"

Options FollowSymLinks
AllowOverride All


Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

2. Configuring 'hosts' file
path:
\system32\drivers\etc


127.0.0.1 www.example.com

3. Restart xammp.

4. Try typing "www.example.com" in your browser!! :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum