Jump to content


2 sites, 2 domains, 1 server


12 replies to this topic

#1 Edmachine

    Young Padawan

  • Members
  • Pip
  • 44 posts
  • Gender:Male
  • Location:Latvia

Posted 29 August 2007 - 12:35 PM

I am making my own webpage, which, of course, is on the main folder (htdocs).

Before some time, me and my cousin (mostly me) started making a Online Football Manager. Now, on my server I created a folder where the manager will be. So in the folder there is a completely different site.

Now, so in order to not make the other site look worse (domain.oo.lv/site (It is a completely different site, needs it's own domain)), I made a domain for it. But how do I configure it to lead to that folder?

I am using Xampp, if that matters.

My domain host is oo.lv.



What I have:

A folder for the manager.
2 domains:
techgeeks.oo.lv Main site
zffl.oo.lv Football manager

I can set:

A
AAAA
CNAME and
NS records.

So, how to I configure my domain to lead to my other site on a new folder?

Thanks in advance :rolleyes:!



P.S. Sorry, if it is wrong to make so many topics. It is just that, this is a completely different subject.

#2 _*Creative Insanity_*

  • Guests

Posted 29 August 2007 - 12:51 PM

Are you talking local? If so for one you cannot because you need a DNS server for any domain to resolve.

Let me explain how a domain works.
When you get a hosting account with a company your account has an IP address. You then register a domain like domain.com. This worded domain is only for the humans eye and the server does not care about. When that domain is entered into a web browser it then goes off to a registrar to find that domain. Once the DNS server holding that domain is found it is then translated to an IP address and delivered to the viewer.

For a second domain name you setup a folder which is called a sub domain sub.domain.com and your second domain is placed as an add on domain which is pointed to that sub domain folder.
So without a DNS server you cannot have a worded domain, you can only use an IP.

You can however have one local domain name by using clients such as no-ip.com which does the resolving for you.. but 2 local I am not aware of.

#3 Edmachine

    Young Padawan

  • Members
  • Pip
  • 44 posts
  • Gender:Male
  • Location:Latvia

Posted 29 August 2007 - 01:15 PM

I am confused.

I have Xampp, which means that I don't use a hosting company. I have a server on my laptop.

Can you somehow explain a bit shorter? I don't quite understand...

#4 _*Creative Insanity_*

  • Guests

Posted 29 August 2007 - 01:31 PM

Ok xamp is only really for localhost development. It is not designed as a web server, just as a development application.
To put it simple you cannot host a .com domain with xamp and do so in your home you will need the following.

A domain
A proper web server configured as such (check my tuts to see how).
and if you want to host your own domain a DNS server to point the domain name to from the registrar.

If you are wanting to do this you are best to get some hosting with some company.
To have your own DNS server is not cheap and I REALLY don't think you want to go there.. trust me on this.. I have created many and there is much to consider and pay for.

#5 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 29 August 2007 - 08:07 PM

Look into Virtual Hosting with the Apache server, its the exact thing you need, and is how most hosting companies work. Do you really think that every single domain on the web has its own server? Lol... only the big buck ones do.
I myself have atleast 5 domains on my localhost... of course they are all production areas and I don't host them online, but the concept is the same.

You might have to look more into DNS and how that works. I've never worked with hosting and such, but you can definitely do it yourself if you use Virtual Hosting and have the name servers and such.

#6 _*Creative Insanity_*

  • Guests

Posted 29 August 2007 - 09:54 PM

I am most def interested in this Demonslay.. can you give some more info.
Part of my past job was server construction for both local networks and internet servers. I was always led to beleave that VH was not too secure.
What name servers are you talking?

#7 Edmachine

    Young Padawan

  • Members
  • Pip
  • 44 posts
  • Gender:Male
  • Location:Latvia

Posted 30 August 2007 - 02:22 AM

Ok, I wrote what I needed in the httpd.conf, but now, how do I configure my domain?

#8 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 30 August 2007 - 07:56 PM

The nameservers (to my understanding) are where your registrar points the domain to. So basically when you enter a domain in your browser, it ships off to a world DNS server to figure what IP it translates to, and your domain's registrar then points to the nameserver, which is kind of like a place where your host gives back the actual IP for your domain, such as the exact location on the server if it isn't a dedicated hosting server.

Some correct me? Kind of confusing to me to be honest, lol, but that's the best way I can describe it. I just find it hard to figure how nameservers come into play... all I know is you have to set them for your registrar of the domain, so it has to be some kind of connection between your registrar and your host.

#9 _*Creative Insanity_*

  • Guests

Posted 30 August 2007 - 08:25 PM

All they really are is just a translation server to take the human name of a URL to an IP address since computers don't understand words.

I am interested in what you done locally for getting a URL resolve to a local location. Do you have some kind of NAT (network address translation) special routing you use.

#10 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 30 August 2007 - 08:58 PM

Well, I've written myself a batch file that automatically does it for me now. :P

Anyways, apart from setting up a Virtual Host in your Apache httpd.conf file, you need to resolve a new host in your Windows hosts file. This file is usually located at 'C:\WINDOWS\system32\drivers\etc\hosts'. All you have to do is enter a new line and enter '127.0.0.1', a space, and the name of your 'server'. The file gives you a syntax and examples.
Then you can simply goto the 'servername' in your browser. For example, instead of 'localhost', you'd goto 'mydomain' (without a domain extension), and it would point to your virtual host files.

(I can send you the batch file if ya PM me for it, lol.)

Edited by Demonslay, 30 August 2007 - 09:00 PM.


#11 _*Creative Insanity_*

  • Guests

Posted 30 August 2007 - 09:40 PM

That is clever demonslay.. very clever.
I might have to push my linbox out to the world and save me on development hosting. I have a URL I can use also.

#12 Edmachine

    Young Padawan

  • Members
  • Pip
  • 44 posts
  • Gender:Male
  • Location:Latvia

Posted 31 August 2007 - 01:34 AM

Sending batch files in the Internet is illegal.

Though, I haven't heard anyone telling something about copying the source :P.

#13 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 31 August 2007 - 04:23 PM

I sent it to him in simple text format. How it is illegal to be sending code as pure text? Might as well sue anyone who ever made a DOS tutorial in that case then...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users