Solved

how to host 2 different web sites on 1 computer

Posted on 2008-10-30
21
263 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
ID: 22847410
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
ID: 22847423
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
ID: 22847780
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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 29

Accepted Solution

by:
fosiul01 earned 250 total points
ID: 22848292
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
ID: 22849103
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
ID: 22849919
frandshansen,

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

Expert Comment

by:fosiul01
ID: 22849939
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
ID: 22850183
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
ID: 22850222
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
 
LVL 5

Expert Comment

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

Author Comment

by:iskibinska
ID: 22850477
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
ID: 22850617
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
ID: 22850753
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
ID: 22851025
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
ID: 22853081
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
ID: 22853148
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
ID: 22857213
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
ID: 22857263

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
ID: 22857830
yes, i agree that it should be shared between  fosiul01 and frandshanses.

How can it be changed now ?
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
New OSQA server has a ton of fake users 4 71
AWS Advice on using WHM/cPanel 1 79
Moving web servers into a DMZ? 3 66
WordPress website error - Unable to access website. 5 65
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

808 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