chesterthebear Posted March 15, 2007 Share Posted March 15, 2007 Hi All, I'm very new to Apache, so please forgive me if the jargon isn't right. I have a Debian based Apache 2 server, and I want to create pseudo subdomains. As I understand it, this is achieved through an entry in one of the Apache conf files. For example, lets say we have the domain 'domain.tld'. I want to create 'sub.domain.tld'. The 'real' way to do it takes time to become active, and seems overly complex (even though the control panel I'm using creates it all for me), AND isn't accessible as http://www.sub.domain.tld, only as http://sub.domain.tld. I read a reference somewhere on the web that talked about 'pseudo' subdomains, which are just Apache redirects to the content of directories within domain root directory (the html folder). Unfortunately, it didn't detail how to do that. What I'm looking for is a single entry in an Apache .conf file that reads the request 'sub.domain.tld' and simply redirects to domain.tld/sub (while leaving the displayed address as 'sub.domain.tld'). If /sub doesn't exists, an error is generated. As soon as /sub is created, the redirect comes into effect and sub.domain.tld works. Is this possible? If so, how do I get it done? Thanks CTB Quote Link to comment Share on other sites More sharing options...
steviewdr Posted March 16, 2007 Share Posted March 16, 2007 Take a look at virtual hosts. My configs are at: http://wiki.kartbuilding.net/index.php/Apache_2_%26_SSL_-_PHP4_-_MySQL_4.1 I also have a video for setting up a virtual host for apache2 (ubuntu and debian are identical in this setup). http://www.skynet.ie/~%20steviewdr/videos/apache2_ssl_ubuntu/apache2_ssl_ubuntu.html -steve Quote Link to comment Share on other sites More sharing options...
chesterthebear Posted March 30, 2007 Author Share Posted March 30, 2007 Thanks Steve. Invaluable. Much appreciated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.