Solved

how to host 2 different web sites on 1 computer

Posted on 2008-10-30
21
260 Views
Last Modified: 2009-05-25
I have a static IP and 2 different names: www.mysite1.com www.mysite2.com.

Is it possible to host them on one IP ?.
0
Comment
Question by:iskibinska
  • 6
  • 6
  • 4
  • +2
21 Comments
 
LVL 5

Expert Comment

by:dougstech
Comment Utility
Yep, this is what I use and it works great for multiple domains on the same IP. Has a bunch of other stuff too FTP server, email server...

http://www.cmfperception.com/liteserve.html
0
 

Author Comment

by:iskibinska
Comment Utility
But it is only for windows ?

Do I need to install a special software on linux to do it ?

0
 
LVL 5

Expert Comment

by:techbie
Comment Utility
You have static ip right..

(1) configure a DNS server in your windows machine.
(2) then in godaddy or whereever u have bought the domain name, update the name server to your new dns server.
(3) now in your machine, configure the dns server to point to the required hard disk location
(4) You also configure your local webserver (apache or IIS) to serve the webpages correctly.

You can get  tutorials to get the configuration instruction of a DNS server in windows xp.

If you have a linux machine, it is very straight forward. Same process as windows. setting up the dns server and then configuring it.

Look this link
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch18_:_Configuring_DNS

0
 
LVL 29

Accepted Solution

by:
fosiul01 earned 250 total points
Comment Utility
hi
to host your own web server,

you have to configure dns ( its not manditory) but its good have have control of your own dns server.

for this follow : http://fosiul.co.uk/KnowledgeCategories.php?CID=35
primary and secondary.

if you do dns management i would of suggest to use 2 internet line with 2 public Ip and 2 seperate server.
one is for master or one is for slave ( one server would be enough for a while)

after completing dns server setup

you need to configure apache for web sites

or you can follow this site : http://www.howtoforge.com/creating-your-own-webserver-with-bind-and-apache-centos5

for setting up dns and apache

let me know if you need further help
0
 
LVL 1

Assisted Solution

by:frandshansen
frandshansen earned 250 total points
Comment Utility
As far as I can see this question is regarding the webserver.

Using Linux it is pretty easy to host multiple websites. Depending on your distribution you need to locate the configuration of your apache. Typically this is /etc/apache2 or /etc/httpd or just /etc/apache if you run 1.3 version of Apache.

I cannot remember the default locations for this on SuSE, but all you need to do is add virtual hosts.

Add this to your config:

    <VirtualHost *>
    ServerName www.yourdomain.com
    DocumentRoot /path/to/www/files
    </VirtualHost>

for each domain you want to host. If you want it also to respond to *.domain.com do this:

    <VirtualHost *>
    ServerName www.yourdomain.com
    ServerAlias *.yourdomain.com
    DocumentRoot /path/to/www/files
    </VirtualHost>
0
 

Author Comment

by:iskibinska
Comment Utility
frandshansen,

Looks pretty easy, so I don't need to configure and setup a DNS server ?
0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
if you dont configure your dns server, then from domain control panel, you have to define which one is your WEbserver

you wil have to define A record from your domain control panel.
0
 

Author Comment

by:iskibinska
Comment Utility
fosiul01:

I host this server, does it change anything ?

Domain Control Panel - what is this ? Is it something whihc comes with DNS  server?

0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
when some one will type www.yourdomain.com , how all the request will come to your webserver ( Ip : 78.168.268.58) so you will have to tell to world that My web server ip is :  78.168.268.58

this is called A record

now if you dont configure your server as Dns server, then from where you bought your domain, they must of gave you domain control panel. from domon control panel, you will have to define what is the IP for your web server.

in this case, you will use your domain providing company's dns server but after definning A record , all trafiq related to your web request will forward to your own Ip

does it make sence ??
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 5

Expert Comment

by:dougstech
Comment Utility
My solution is a windows program and does not require any special configuration.
0
 

Author Comment

by:iskibinska
Comment Utility
but i am going to register those 2 domanins:
www.mysite1.com
www.mysite2.com will be registered let's say at godaddys com and they will have the same
IP's address. I have DNS servers which were given by my ISP

so now, it is the matter for apache to know which site to display, depending on which site is requested.

Correct me If I am wrong, but I don't think that I need DNS server. Right now I have only
www.mysite1.com working like this, I need to add www.mysite2.com
0
 
LVL 5

Expert Comment

by:dougstech
Comment Utility
You will give the domain registrar your IP address, and in the server (http://www.cmfperception.com/liteserve.html) you will give the server the paths to the different sites. When the browser requests your website, the server will send the site requested (whatever domain they went to).

No DNS configuration is necessary.
0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
From your comment, your ISP is responsible for your dns management. is  not it ??

ok , supose, you have registered domain from godaddy. so, initally, godady is the responsible for your Dns management of your domain.

by defult, it would be, ns1.godaddy.com , ns2.godaddy.com

now, you might change the nameserver from ns1.godaddy to ns1.yourisp.com and ns2.godady.com to ns2.yourisp.com

so now your isp is responsible for your domain.

for your first doman www.mysite.1.com : in your isp's dnsserver its saying A record for www.mysite1.com is the IP of your webserver.

now when you will regiseter another domain, same way you did for First domain, you have to do the samething for 2nddomain.
since your isp is responsible for your dns management, you will have to tell them, change the A Record of www.mysite1.com

thats it.

and since you are responsible for only web server, just configure apace and enter the 2nd domain information as other people and i have sent the article from howto : http://www.howtoforge.com/creating-your-own-webserver-with-bind-and-apache-centos5-p2
0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
Hi , I never object to any ones accepted solution solution, but

you will have to explain me, why you have accepted dougstech solution ??

his solution is nothing to do about what you have asked here and what we were trying to help you
0
 
LVL 5

Expert Comment

by:dougstech
Comment Utility
how does my solution have nothing to do?
sure, its a windows program, and not linux, but thats what WINE is for. you guys are going way over what actually needs to be done, and can be done in a much simpler way.
0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
You didnot understand why i made the objection. its nothing to do with your solution, its the objection about who accepted your solution

if you look at his question, he asked how to configure apache for hosting websites

and i belived the solution we tryed to give him thats the accurate  solution for configuring apache and the solution for his problem
but he accepted a solution which he didnot asked.

he didnot ask for which software would be easy for web server configuraiton, he asked how to setup apache for websites, we were giving our time to help him how to configure apache and trying to make him understand how this works

but end of the day he accepted something which he diddnot wanted in first place

hope i made sense
0
 

Author Comment

by:iskibinska
Comment Utility
Hi, where can I see the history of my grading. It is possible that I might have made a mistake for which I am sorry , my intention was to grade fosiul01  and  the person who gave a snippet for apache configuration.
0
 
LVL 5

Expert Comment

by:techbie
Comment Utility

Hi there,

I too feel that the points be awarded to fosiul01. or could be shared between fosiul01 and frandshansen:


techbie
0
 

Author Comment

by:iskibinska
Comment Utility
yes, i agree that it should be shared between  fosiul01 and frandshanses.

How can it be changed now ?
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
URL redirect 4 47
how to setup ssl access to internal local machine 4 97
file path 14 63
ColdFusion Rereplace 3 61
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now