Options

How Websites work

DerekAustin26DerekAustin26 Member Posts: 275
Obviously websites are on a server.

A server is just a pc on a much larger scale.

Now my question is for instance.. "Google" - Google is a website, but that website is an application.

Google is stored on a the Server's HD. So what I dont understand is, how does Google, go from an application that some programmer wrote(not accessible to any network or person), to being posted and available to the World to access?

And if you were the Admin of the Server that hosted Google, is google stored in a folder somewhere? It must be accessible some other way than just going to "google.com" since it has to be physically stored somewhere. How does that work?

Comments

  • Options
    Hyper-MeHyper-Me Banned Posts: 2,059
    Do not make multiple threads with the same content.
  • Options
    rsuttonrsutton Member Posts: 1,029 ■■■■■□□□□□
    I would recommend that you take a look at the Wiki page on IIS, Apache and web servers. That should explain it.
  • Options
    Forsaken_GAForsaken_GA Member Posts: 4,024

    A server is just a pc on a much larger scale.

    If you only knew.... and if it were only that simple.

    Running a website like Google involves a very many servers, in many locations (geo location for speed, as well as for redundancy) and a whole lot of work on the backend (database servers, application servers that do more than just spit out HTML for your browser), along with a non-insignificant amount of network voodoo
  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    rsutton wrote: »
    I would recommend that you take a look at the Wiki page on IIS, Apache and web servers. That should explain it.

    This is a good recommendation - when you also take the time to setup your own mini webserver to fully understand the whole process. You could even set this up on your desktop if you were inclined to do so.

    As forsaken has mentioned, Google is probably a bad example to start with if you want to learn about how websites work, their infrastructure is mind boggling but it still boils down to the simple fact that a web page is presented to you in your web browser (in a html document type).

    If you need help to install a webserver on your desktop, post back here and someone may be be able to help.
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • Options
    Forsaken_GAForsaken_GA Member Posts: 4,024
    The best way to learn all of this is to just decide what you want to do for a website (start with something basic like a blog or a message forum) and then install some form of linux (debian is my recommendation) with a LAMP stack.

    Once that's done, make extensive use of aforementioned monolithic search engine until you've acquired enough cluepons to where you no longer need to be smacked with the clue x 4.

    (And please note that I said 'best' way, not 'easiest'. I don't believe that learning should be watered down to the level of your average sound byte)
  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    The best way to learn all of this is to just decide what you want to do for a website (start with something basic like a blog or a message forum) and then install some form of linux (debian is my recommendation) with a LAMP stack.

    Once that's done, make extensive use of aforementioned monolithic search engine until you've acquired enough cluepons to where you no longer need to be smacked with the clue x 4.

    (And please note that I said 'best' way, not 'easiest'. I don't believe that learning should be watered down to the level of your average sound byte)

    It is the best way in our opinions, but not the only way it has to be said, if the OP is used to a windows environment he has several options to get a simple webserver up and running. Id recommend IIS if you have xp client running or access to a 2003 test server.
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • Options
    veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    It also helps to read up on how DNS works. That is vital in knowing how the Internet works.
  • Options
    DerekAustin26DerekAustin26 Member Posts: 275
    It doesnt have to be Google. I just want an example of how any website works. How does it go from an application to a web server?

    Wikipedia just talks about the History, The version, the security, authentication mechanisms & the media pack. None of that explains my question..

    If I had a server, I'd love to try this, but I dont.

    Can I look this up ? Sure, but no website explains this point blank to my question. Hence is why I am asking someone on here.

    As far as the internet goes... I understand that, I am just not familiar with how a Server website is managed. As far as a website being used on multiple servers.. I know that.. I'm looking for a fairly simple answer..

    Lets say I wrote up my own "search engine" or "software" that i want the world to use.. Besides installing a commercial line and all the infrastructure... How does the website become public? If you go to the OS that is hosting it, is there a back end way to access this "public software" for managing & debugging etc..??
  • Options
    DerekAustin26DerekAustin26 Member Posts: 275
    It's a difficult question to articulate..

    We all know that when you connect to a webserver that it sent you html instructions for your browser to read and display on your screen.

    When you connect to that webserver, where is IT stored? It's not something that is sitting in space somewhere, it has to be stored somewhere right?

    And that would be the server that is hosting it.. Would it be in a folder that you can access?

    I know this is completely bad analogy, but a regular home pc can be a "server". I share a folder that has a file named "test" --> path would be \\'mycomputername'\test

    well when you connect to a server.. you goto "http://www.whatever.com/test
    Domain = whatever ; Filename = test

    So that would be if I was hosting the server, I would just go to the "whatever" server and find the file "test" ... This may be a weird screwed up analogy, but this is the kind of answer I'm looking for.. Anyone explain how it is stored on the Server and how it is accessed plz?
  • Options
    kalebkspkalebksp Member Posts: 1,033 ■■■■■□□□□□
    At the most basic form a website is simply a piece of software (the webserver) that listens to requests from clients (a web browser). In response to the request the webserver sends back text information (HTML) which the web browser then uses to render a webpage. This is a huge oversimplification, but useful to get a general idea. Sometimes websites are just static files that are sent to the clients, or they can be applications that generate the content on the fly (which is how most dynamic websites work).

    It's impossible to tell you exactly how websites work because there is more than one way to create a website.

    As to how a website becomes public, that's more of a DNS topic than a webserver topic. Yes most webservers/applications have methods to manage and debug the server, both locally and sometimes remotely.

    A server can be just about any computer, the only reason that production servers are very expensive is because they need to be very reliable and usually need more horsepower. It's completely doable to install a webserver on your desktop (IIS is built in to XP), it's just another piece of software.
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    The issue is you are asking for a simple answer to something that just doesn't have one. There a lot of things that go into and best is to start at the beginning and see it in action yourself. Or get a book and get comfy.
    An expert is a man who has made all the mistakes which can be made.
  • Options
    rsuttonrsutton Member Posts: 1,029 ■■■■■□□□□□
    The issue is you are asking for a simple answer to something that just doesn't have one.

    This is what I was thinking as well. There are a lot of variables, implementations, protocols, devices, magic etc that are involved in displaying a web page. You question seems to indicate you want a good understanding of how it all works, in which case you need invest a bit more time in researching the subject.

    If you are not interested in the details, then a simple answer is: Websites are retrieved by downloading files from a remote computer to your computer which are then rendered in your browser.
  • Options
    dynamikdynamik Banned Posts: 12,312 ■■■■■■■■■□
  • Options
    Forsaken_GAForsaken_GA Member Posts: 4,024
    In the linux world it basically works like this -

    You design a website on your computer. You decide to make that website public. So the first thing you need is a server with a routable IP on it. You obtain some sort of hosting service and get such a thing. The next thing you need is a domain name. You register example.com.

    Now you need to associate the two. Lets say the IP that your server on is 1.1.1.1. You then set the DNS for example.com and Example Web Page to resolve to 1.1.1.1, so the two are linked.

    You then upload your website to your server, whether it be via FTP, rsync, SFTP, or shipping a hard drive to the hosting company so they can manually add the files. Whatever, you put the files on the server, usually in a specific subfolder. My company uses the path structure /web/sites/<username>/<domainname>/, but this is completely arbitrary and you can use any path structure you want. Most folks use /home/<username>, but if you wanted to put the content of your site in i/like/traffic/lights/but/not/when/they/are/red, there's nothing stopping you from doing so. So for this example lets say you upload the site to /web/sites/example/example.com

    Once the site is on the server, you then configure your web server daemon to make use of it. In the case of apache, this means I set the path it looks for documents in by default to /web/sites/example/example.com, usually by editing a text file.

    Now my website is publically accessible. So it works like this -

    I type in example.com in my web browser. My computer issues a DNS request for example.com, and it gets the answer back that example.com is at 1.1.1.1. So my browser then initiates a connection to 1.1.1.1 on port 80, which is my server. Apache is listening on port 80, sees the request for the website, and sends the index.htm(l) in /web/sites/example/example.com/index.htm(l) because that's where I told it to look for the site. My browser receives said index page, and I am now looking at the entry to the site.

    This is a grossly simplified explanation of how things work, and does not take into account any scripting modules which may need to be installed (PHP, perl, etc), backend database storage, content stored and served over the network, or anything like that, but should server as a conceptual model
  • Options
    DerekAustin26DerekAustin26 Member Posts: 275
    I went over to my bro's house. He has pc with Windows 2003 & 2008 Server installed on his laptop.

    So I found my answer..

    Your website is stored in a file hiearchy just like anything else on any other pc. He manages a website called "matrixforce.com/whatever" and he went to "Administrative Tools" from the start menu, and navigated to the "whatever" folder (i honestly dont remember which one it was) and it showed the files, images, folders that host the website. The path to it on the local machine was D://matrixforce/wahtever - everything was the same as the URL except it had "D://" representing it was on the local machine.

    I know alot of you may already know this, but this is basically the answer I was looking for. I just wanted to know how a "website" was stored on your machine and how you can get to it & manage it via the hosting web server OS.

    Neways, thanks for helping out though guys! Sorry my question was poorly articulated.
  • Options
    dynamikdynamik Banned Posts: 12,312 ■■■■■■■■■□
    Except, it wouldn't be stored like that for applications like Google. Those would be database-driven and not stored in a hierarchical directory format.
  • Options
    bgrablinbgrablin Member Posts: 86 ■■□□□□□□□□
    Quick Answer: PFM (Pure F#ckin Magic)
    "The object of war is not to die for your country but to make the other bastard die for his."
    -General George S. Patton

    My Site | Face
  • Options
    DerekAustin26DerekAustin26 Member Posts: 275
    Well now I'm officially in a Windows Server 2008 Administrator class for the next 8 weeks. Maybe this will teach me some good stuff!
  • Options
    veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    Well now I'm officially in a Windows Server 2008 Administrator class for the next 8 weeks. Maybe this will teach me some good stuff!

    That will help some. You may also want to grab a Network+ book, or maybe a CCNA book and just start reading through it.
  • Options
    DerekAustin26DerekAustin26 Member Posts: 275
    Got 3 CCNA books.
  • Options
    veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    Got 3 CCNA books.

    Read them. :)
  • Options
    DerekAustin26DerekAustin26 Member Posts: 275
    lol i do, but it's very difficult stuff to learn. icon_sad.gif
  • Options
    veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    LOL I do, but it's very difficult stuff to learn. icon_sad.gif

    I know the feeling. When I was working on my AAS in Networking it was difficult to wrap my brain around how computer networks & servers work. Take it easy and slow, if your read to much at a time you will only frustrate yourself.

    This might help: http://computer.howstuffworks.com/web-server.htm
  • Options
    SepiraphSepiraph Member Posts: 179 ■■□□□□□□□□
    First you need a connected network, assuming some form of IP connectivity between server and client.

    Then you can setup a web server (e.g. Apache) from the server side, and then use a web browser on the client side.

    Write some simple php/html pages and store them on the server and voila you got yourself a small www :)
Sign In or Register to comment.