httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Freeman <neil.free...@asa.co.uk>
Subject [users@httpd] Subdomains of a hostname - possible?
Date Mon, 12 Jan 2004 17:55:08 GMT
I have a site whose pages contain absolute links for items such as 
pages, images, stylesheets etc.

e.g.

	<img src="/images/title.jpg" />

This works fine if accessed from a proper domain (eg 
http://www.asa.co.uk) or from a subdomain (eg http://site1.asa.co.uk)

I have an offline development system setup with LAMP with which I am 
attempting to setup subdomains which will work directly off that machine.

What I would like users to be able to do is enter the following into 
their browser:

	http://mymachine/site1/

and have it access a local subdomain, eg

	http://site1.mymachine

The main virtual host I have setup for the machine is as follows:

	<VirtualHost 192.168.1.138>
		DocumentRoot /www.main/www
		ServerName mymachine
	</VirtualHost>
	<Directory "/www.main/www">
		AllowOverride All
	</Directory>

This works fine. I thought I could set up another virtual host for this 
new subdomain as follows but it doesn't work:

	<VirtualHost 192.168.1.138>
		DocumentRoot /www.site1/www
		ServerName site1.mymachine
	</VirtualHost>
	<Directory "/www.site1/www">
		AllowOverride All
	</Directory>

It doesn't matter if I have to setup/change hosts files as long as I can 
get the set up to work.

Any suggestions as to how other people manage this would be greatly 
appreciated.

Thanks,

Neil

-- 
----------------------
  www.curvedvision.com
----------------------



This communication is confidential to the intended recipient(s). If you are not that person
you are not permitted to make use of the information and you are requested to notify the sender
immediately of its receipt then destroy the copy in your possession. Any views or opinions
expressed are those of the originator and may not represent those of Advanced System Architectures
Ltd.

*** This Email Has Been Virus Checked ***


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message