473,836 Members | 1,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

setup Apache for Subdomains

104 New Member
HI all,
i have a domain abc.info on a remote server and its files are hosted on let say, and a subdomain subdomain.abc.info hosted on let say ("/docs/www/") and another subdomain2.abc. info is also hosted on ("/docs/www/domain2")
I'm running apache, what settings should i do in apache when as i type subdomain.abc.i nfo and it opens the contents in /docs/www and as i type subdomain2.abc. info it opens the contents of /docs/www/subdomain2/

I have tried virtual host as follow

Expand|Select|Wrap|Line Numbers
  1. NameVirtualHost *
  3. <VirtualHost *:80>
  4. ServerName subdomain.abc.info
  5. DocumentRoot "/docs/www"
  6. </VirtualHost>
  8. <VirtualHost *:80>
  9. ServerName subdomain2.abc.info
  10. DocumentRoot "/docs/www/subdomain2"
  11. </VirtualHost>
but the thing is when i type subdomain.abc.i nfo and subdomain.abc.i nfo both open the contents of /docs/www

Best Regards
Jan 18 '07
12 23099
3,237 Recognized Expert Specialist
Sorry for the long delay.
I have WAMP running on my desktop at work for testing purposes, and here is the solution that worked for me.

You had a line that said simply
Expand|Select|Wrap|Line Numbers
  1. ScriptAliased
I had to remove this line for Apache to even start.

In your virtual host section, you have the following set up:
Expand|Select|Wrap|Line Numbers
  1. <VirtualHost subdomain.abc.info:80>
  2.   ServerName subdomain.abc.info
  3.   DocumentRoot "C:/wamp/www"
  4. </VirtualHost>
  6. <VirtualHost subdomain2.abc.info:80>
  7.   ServerName subdomain2.abc.info
  8.   DocumentRoot "C:/wamp/www/webmail"
  9. </VirtualHost>
Replace that with this:
Expand|Select|Wrap|Line Numbers
  1. <VirtualHost *:80>
  2.   ServerName subdomain.abc.info
  3.   DocumentRoot /wamp/www
  4. </VirtualHost>
  6. <VirtualHost *:80>
  7.   ServerName subdomain2.abc.info
  8.   DocumentRoot /wamp/www/webmail
  9. </VirtualHost>
And everything should run smoothly.
Jan 24 '07 #11
104 New Member
Yesssssssssssss !!! :D

worked !!!! thanks man you are genious :P
Jan 25 '07 #12
3,237 Recognized Expert Specialist
Glad to help.
Jan 25 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

by: steve | last post by:
Hi I am writing an application which ideally requires the creation of subdomains dynamically via asp. However I want all the subdomains to point to 1 asp file, which I wish to use to figure out which subdomain has been typed in the url and to process it appropriately. I was thinking of 2 possible approaches and I am a bit 'cloudly' about both:
by: craigkenisston | last post by:
In an application I'm developing I will be using subdomains in the main website to hold some sections of the sites. There will be many serverside generated links that will point to this subdomains. I already have subdomains in a preproduction server and it works fine then, but how do I do that here in my development machine ?? I have WindowsXP SP2, but I don't see anyplace where I can create subdomains, since everything are actually...
by: radiax | last post by:
Is there a way to associate or bind a subdomain to a tcp sockets under .net framework (vb.net / c#). I know ip address can be used when using sockets, but the problem is the ip address is shared among subdomains (limited ips supply). Iam looking for possible way to use subdomain.domain.com instead of ip address. Any inputs?? thanks
by: See_Red_Run | last post by:
Hi, I am trying to figure out how to get started with PHP/MySQL. Everything I've read so far says to start with PHP first. I was expecting something like Visual Basic Express or some other type of free IDE. So I discovered that I needed to download a virtual server, so I downloaded OmniSecure and followed the set up instructions as far as I could figure them out. So here is where I'm stuck. 1) While trying to set up and configure...
by: jm | last post by:
I am setting up Apache 2.0, PHP5, and PostgreSQL 8.2 on Windows XP. I have setup everything correctly in the past but recently had to do a reformat and have to do the installs all over again. First, I installed Apache with no problems what so ever. Next, PHP. Again smooth install. With a little tweaking of the httpd.conf file, Apache was working with PHP. Next was PostgreSQL. Again, the install went fine and I could use
by: Gowri | last post by:
Hello, I am new to Python and am trying to setup Apache to serve Python using mod_python. I'm using a Windows XP box. here is a list of steps i followed for the installation: 1. Installed Apache 2.2.6 2. Installed Python 2.5.1 3. Installed mod_python 3.3.1
by: maflatoun | last post by:
Hi all, I've been doing ASP.NET C# for 4 years now and that's around the same # of years I've been away from PHP. But now I'm looking at this PHP position that looks really interesting to me. However, I have some unresolved questions setting up my own test enviroment having bunch of sites relative to http://localhost with each site having it's own subdirectories and an include file (ex. Site Navigation with images that's accessible from...
by: Josh | last post by:
I run a Joomla website and am familiar with php in some but not all aspects. Currently I am trying to find some solutions related to session handling. Am I correct in saying that "login" is kept in sessions? I can see active sessions in my mysql database, but is that the only place this information is stored? Sessions and cookies I know are related also, but how specifically (session info stored in cookies?)? Right now, when users...
by: Jonathan Wood | last post by:
Perhaps someone who understand Web hosting can offer some insight into this. I have several sites hosted at http://www.crystaltech.com. There were highly recommended and seem pretty good. But this weekend I tried to create some subdomains. For example, subdomain1.domain.com and subdomain2.domain.com. While Crystal Tech supports this, subdomains must point to an IP address. Therefore, it is not possible to point the subdomain to a...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.