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

Home Posts Topics Members FAQ

setup Apache for Subdomains

usafshah
104 New Member
HI all,
i have a domain abc.info on a remote server and its files are hosted on let say 217.56.34.12, and a subdomain subdomain.abc.info hosted on let say 80.45.1.26 ("/docs/www/") and another subdomain2.abc. info is also hosted on 80.45.1.26 ("/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 *
  2.  
  3. <VirtualHost *:80>
  4. ServerName subdomain.abc.info
  5. DocumentRoot "/docs/www"
  6. </VirtualHost>
  7.  
  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
Motoma
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>
  5.  
  6. <VirtualHost subdomain2.abc.info:80>
  7.   ServerName subdomain2.abc.info
  8.   DocumentRoot "C:/wamp/www/webmail"
  9. </VirtualHost>
  10.  
Replace that with this:
Expand|Select|Wrap|Line Numbers
  1. <VirtualHost *:80>
  2.   ServerName subdomain.abc.info
  3.   DocumentRoot /wamp/www
  4. </VirtualHost>
  5.  
  6. <VirtualHost *:80>
  7.   ServerName subdomain2.abc.info
  8.   DocumentRoot /wamp/www/webmail
  9. </VirtualHost>
  10.  
And everything should run smoothly.
Jan 24 '07 #11
usafshah
104 New Member
Yesssssssssssss !!! :D


worked !!!! thanks man you are genious :P
Jan 25 '07 #12
Motoma
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

1
2245
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:
3
1791
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...
4
2047
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
10
2432
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...
6
2425
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
1
1847
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
1
2374
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...
9
7818
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...
3
2965
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...
0
9813
marktang
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...
0
10829
Oralloy
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...
0
10535
jinu1996
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...
1
10582
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,...
0
10245
tracyyun
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...
0
9365
agi2029
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...
1
7778
isladogs
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...
2
4005
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3106
bsmnconsultancy
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.