Introduction: Customizing Your Apache Server Space, and How to View It Over the Internet.

Picture of Customizing Your Apache Server Space, and How to View It Over the Internet.

In this, my first Instructable, I will be showing you a continuation of this instructable, "Make Your Computer Into A Server in 10 Minutes." In this continuation, I will teach you how to customize the server page that comes up when you type "http://localhost" in the server's web browser, how to modify your system so that you don't need to type "http://localhost" all the time, and how to view your server over the internet through another computer which is not the server, aka, "surfing the web."
This instructable will be going over how to do these things with Apache 2.2 server software. The lastest version available when I wrote this was Apache 2.2.61 or something like that.

Step 1: Customizing the Server's Web Page

If you are reading this step, I am assuming you have read and have set up your Apache 2.2 software. If not, go here first. OK, in this part, I'll discuss modifying your index.html located in your htdocs folder of your Apache software. This should be similar to your path: C:\(Path of Apache folder)\Apache Software Foundation\Apache2.2\htdocs\index.html It is very simple, all you need to know is how to html code, make your web page or entire website outside the server computer, delete the original index.html, and replace it with all your new files. Note: when you code your own webpage, save the index page as index.html, not index.htm because when you replace the server's index.html with index.htm, it won't detect it, it will only bring up a page saying "Index of...". index.html, remember. Also, when you paste the new index.html in, it has to be in the same directory as the original one. After that, any pages, images, or downloadable files that you have as links from the index.html page can be put in folders and organized the way you want.

I will update all my pages upon request to do so. Leave comments about anything you don't understand so far.

Step 2: Tired of Typing "http://localhost" to View Your Webpage From Your Server... Read on Then = )

In this step, I will tell you how to modify your system, so that you can type something other than "http://localhost" This section does require you to go into your System32 folder, so I ought to warn you, please don't mess with any files in there besides the ones I tell you to edit. OK, first navigate to "C:\WINDOWS\system32\drivers\etc", without the quotes, and you should see a file named "hosts". This file has no extension, so when you make your changes, just save it, don't save it as .txt or anything. Ok, now Right-click it-->Edit-->notepad. You should see a bunch of text with # to the far left of it. Leave those alone, those are just notes. At the very bottom though, there is some text that looks like this:

127.0.0.1 localhost

Leave that alone, and add a line under it saying this:

127.0.0.1 WhatEverUWANT

The end result should be:

127.0.0.1 localhost
127.0.0.1 WhatEverUWANT

Note these changes should be made on the computer with the Apache 2.2 server installed on it.
Now just File-->Save

That's it, go to the webbrowser on the server computer and type in "http://localhost" to see your web page if you did that step, otherwise, you would just see that standard "It Works!!" Now test it to see if you can input what you changed and have your server page show up.

For mine, I wasn't that creative, I just put it as:

127.0.0.1 localhost
127.0.0.1 www.w3bm3.com

What ever. = )

Step 3: What, the Internet?!?

Picture of What, the Internet?!?
This step is fairly easy, and I feel bad that I made a completely different step for it. OOhhhh well...

First go onto the server computer and go to the:
Start menu-->Run-->cmd-->ipconfig/all

It should bring up a bunch of information about your computer, your DNS, Gateway, and finally, the one we're looking for, your IP address.
When you find you IP, which should look like this on cmd prompt:

IP Address............:***.***.*.***

  • = #'s

then memorize that series of numbers exactly the way they are, including the "." in between them and go to another computer, go to the web browser on that computer, and type in your IP address of the server computer in the navigation bar of the browser.
You should see your server page from that computer.

Now, if you were hoping to learn about how to get a web domain for free out of doing this, I apologize, but in my research, all sources have turned up saying that you have to buy one through a registrar and then apply it to your server, which unfortunately, I don't know how to do, and don't want to pay for something that I had originally made to be free. But if anybody reading this knows how to get one for free, make an Instructable on how to do it, and then PM me because I want to read your Instructable, lol. = )

Comments

nmcnaughton (author)2013-06-15

how do you add a domane name to it so i can use as a real websight. if anyone knows an instructables please let me know.

stacy456 (author)nmcnaughton2014-06-22

what a whed name dhork

burwuro (author)2012-02-03

if you want theirs quite a few free registars, the one i know of is co.cc (pretty much a free chineese one) though with it, your website may not rate well on google! (google doesn't like it.) due to this, id suggest using this until your set up then maybe buy a .com for $5. wish i could help with setting it up with apache, it was what i was hoping you could help me with!

lchan3 (author)2011-06-24

excuse me if i open it as notepad and then finish

127.0.0.1 localhost

Leave that alone, and add a line under it saying this:

127.0.0.1 WhatEverUWANT

The end result should be:

127.0.0.1 localhost
127.0.0.1 WhatEverUWANT

and file-->>save "the computer will say save as" i try to follow your procedure like "file" "save" and ends up like this "host.txt" is there any editor for the "host.file"???

Pettrocity (author)lchan32011-08-17

Did you set the file extension to "all files *.*"? That could be your problem.
Gnoseon

djr6789 (author)2009-02-16

nice instructable!

Jackhole (author)2008-07-14

So you can access this server from other computers with the IP address, but if you wanted to access it by typing in 'this.com' then you'd have to pay? This seems cool, perhaps I'll set one up so I can remotely upload files and such.

GorillazMiko (author)2007-12-25

cool, should have more pictures though.

ScriptKing1 (author)GorillazMiko2007-12-25

sorry, I had done all this before I thought of making it an instructable. I was doing trial and error until I got it all working, and then I thought, "Damn I should've recorded the process." Thanks for your input though. I'll see what I can do.

About This Instructable

8,326views

20favorites

License:

More by ScriptKing1:Customizing your Apache server space, and how to view it over the internet.
Add instructable to: