How to set up an Apache server on my own machine?

Raith Rapture

Newbie

Posts: 7

3+ Months Ago

Hi all and thanks in advance for any help you can give me.

I'm new to web hosting but not web design, etc, and could use a bit of help. I am currently building a server on my own and have a computer set up to be a server for a small project. I've done my research and am using Apache 2.2.x on Windows XP SP3 and already own a domain name.

I'm following the instructions on the Apache website for installing on Windows but I don't know what to enter for my server name. As I said, I do own a domain name already, however I have a dynamic IP address through my ISP but have set the computer I'm using as a server to static and assigned it an address through the proper sub-domains of my router. I don't have a DNS set yet either.

If anyone can give me a run-down as to how to set up an Apache server on my own machine and how to host the website on it, I would greatly appreciate it. Any sources or resources are greatly appreciated as well.

Don2007

Web Master

Posts: 4923

Loc: NY

3+ Months Ago

I assume you don't plan to tell your ISP that you want to run a web server nor do you plan to pay for a static IP address.

Based on those assumptions & the assumption that they won't see the traffic, you have to use dyndns or something similar.

Raith Rapture

Newbie

Posts: 7

3+ Months Ago

I do intend to eventually move to a business grade ISP and get a static IP address, but not until I establish the site and have it running.

Either way, what do I use as a server name for installing apache if I'm hosting from my own machine?

Bigwebmaster

Site Admin

Posts: 9189

Loc: Seattle, WA & Phoenix, AZ

3+ Months Ago

Are you going to buy a domain name? If so you could make your server name something like homeserver.yourdomain.com or whatever you would like. If you like planets you could name your server:

earth.yourdomain.com

It does not matter, just pick some sort of subdomain off of your real domain. If you want the public to be able to access your website through your domain name (even though you host it at your site), you will still need to buy a domain name (around $10 a year), and then as Don2007 said set it up with dyndns so that it works with your dynamic IP address. Dyndns is basically a service where you setup your nameservers to point to theirs, and then with them you can have it automatically keep pointing to your dynamic IP address with your ISP.

Most ISPs do prohibit this sort of behavior (some even block port 80 outbound to prevent it), so I wouldn't do much more than test your setup, and then once ready move over to a commercial version of your service. Finally this is not the best solution if you plan to have a reliable website. You will have downtime, and be ready to expect that. You really need to have your server at a datacenter where they specialize in keeping your equipment online and connected right on the backbone. With every ISP I have been with, there have been times that my service at home has not worked, and it was their fault. Sometimes for a few days. Just want to be sure you know the consequences if you decide to go that route. The commercial side of these ISPs may be more dependable though, I am not entirely sure.

Raith Rapture

Newbie

Posts: 7

3+ Months Ago

Thanks for the advice Big. I do already own a domain name and have it through godaddy atm. What it comes down to is that I'm building a website I eventually plan to make into a business such as gizmodo or IGN, something like that.

The reason I'm not using commercial grade ISP and static IP service yet is because I lack the money for this yet and want to host the site in order to get a small business loan to purchase better server equipment and to afford the static IP, etc.

So in short, while installing apache for this basic setup would be

Domain: whatever(.)comServerName: whatever it is through DynDNS.whatever(.)com

Is this correct?

Bigwebmaster

Site Admin

Posts: 9189

Loc: Seattle, WA & Phoenix, AZ

3+ Months Ago

I just looked at their Dynamic DNS Free page and it appears your server name will most likely be something along the lines like yourservername.dyndns.org. Remember all this does is put all of your DNS through them which they dynamically do the A records which point to your server at home from which you can setup Apache on. What I would do is set things up with DynDNS first and I am sure you will have all the information then. Regardless, you can still setup Apache now and name the domain and servername whatever you want. When you know the information just go in the configuration files and adjust it. It would be good for you to understand how to edit those anyway.

I understand that you are on a budget and most likely doing it for those reasons, however, once you have the budget I would still recommend not going the commercial grade ISP way. I am fairly certain that will still be much more expensive than just paying for virtual hosting at a hosting company (like ozzu, or whoever).

My recommendation to you is to play around with things, and maybe try the free route for awhile. Then once you have the budget move over to virtual hosting (which these days can accommodate most moderate websites for fairly cheap, and probably cheaper than any other solution), and then if you ever outgrow that finally move to dedicated hosting where you lease your own server or have your server that you own co-located at a datacenter. By the time your site is big enough that it needs its own dedicate server, you will probably make more than enough to afford that anyway. First starting out though you aren't going to need much and going with virtual hosting would be a fairly low risk, low budget way to start your website. Remember you can always upgrade and move as you grow, you are never fixed to a certain company.

Using a dedicated server whether through commercial ISP services, or at a datacenter is like buying a bus to take one kid to school. Wow, I am starting to sound like Joebert here, LOL.

Raith Rapture

Newbie

Posts: 7

3+ Months Ago

Ok, I've been looking into this a bit further with DynDNS free service. Does it allow for you to use your own domain name registered through another service? I haven't quite found the info on that yet. If you can even just point me a direction for an FAQ on it I'd appreciate even that much.

Thanks a lot for the information provided.

Bigwebmaster

Site Admin

Posts: 9189

Loc: Seattle, WA & Phoenix, AZ

3+ Months Ago

Using GoDaddy for your domain name should be perfectly fine. In GoDaddy you would just update the DNS nameservers to point to the DynDNS nameservers that they tell you to use.

Raith Rapture

Newbie

Posts: 7

3+ Months Ago

Ok, awesome. Thanks. if I have anymore questions I'll be back.

Raith Rapture

Newbie

Posts: 7

3+ Months Ago

Ok, so apparently the hostname isn't the same as a nameserver... cause I tried to put in the hostname on GoDaddy's nameservers and it said it wasn't registered. Where can I find the nameserver or if I entered the correct information, how can I resolve this?

Bigwebmaster

Site Admin

Posts: 9189

Loc: Seattle, WA & Phoenix, AZ

3+ Months Ago

I looked into things further for you. I knew DynDNS was probably what you were after, but wasn't exactly sure what product you needed there until I dove into it further. Apparently their free services only lets you use one of their subdomains as your actual server name, something like:

yoursubdomain.dyndns.org (or whatever, has to be under one of their domains though)

To actually get your domain to work with Apache you need to setup your domain in the account area there:

Attachments:

DynDNS Account Area

In there you would click on My Zones / Domains and then proceed to add your actual domain. Click Add Zone Services, put your actual domain name that you want people to visit and select for registration: None, the domain is already registered. You select that option because you are already registered with GoDaddy. For DNS Services you would select "Custom DNS" and then hit continue at the bottom. Unfortunately this part of the service is not free and appears to be $29.95 per year:

It appears you can use the dynamic IP address to work with it. So overall to do what you want it appears to not be completely free. If you choose to just use one of their subdomains off of their domains then it may be free, but unfortunately with that method you wouldn't be promoting your domain name anymore (and instead their subdomain).

Raith Rapture

Newbie

Posts: 7

3+ Months Ago

Ok, that was the conclusion I had come to as well, but just wanted to make sure before committing money to something I don't fully understand yet. I'll keep reading through things and hopefully get a better grasp of it.

Thanks again.

mam1606

Newbie

Posts: 8

3+ Months Ago

Another alternative: I use NoIP which does not require my domain name to include their name. It is a program which continually access my dynamic ip address and forwards it to a static ip. I've used it for years with no problems. (ALthough I presently have an issue, it is because I have just changed to a different modem (SMC) and haven't been able to configure it properly yet. I can't post any links but you can find it if you goggle noip.

per440

Born

Posts: 4

3+ Months Ago

If you just want to do some testing and learning of website development then you can also install WAMP or XAMMP on your machine. Easy to install and configure and very useful too.

charcoal

Novice

Posts: 15

3+ Months Ago

I think that the best method to learn webserver is to install it on a virtual machine, you can do it what you want without any risk for you real software

ThEsToNeMaN

Born

Posts: 2

3+ Months Ago

well i'll tell u what i do to run my webserver, and i have a dynamic ip(it don't change unless i reset my modem though),

i got uniserver, which is mysql and apache, all u gotta do is set it up, which isn't hard, then 2 add ur sites u have 2 edit the httd.conf file 2 set up ur virtual hosts, and all that stuff

and for my dns i uses freedns.afraid(.)org

with the domain host all u do is set up there nameservers which is like ns1.afraid(.)org-ns5.afraid(.)org, and point them towards ur ip.

best thing is, its all free, well of course the domain, but u can get thoughs 4 free also, and u can host multiple sites with it aswell

regards,

ThEsToNeMaN

Daemonguy

Moderator

Posts: 2698

Loc: Somewhere outside the box in Sarasota, FL.

3+ Months Ago

Wouldn't it be simple enough to cname www to the dyndns name?

Edit the zonefile for the domain you own and add;

www IN CNAME <hostname>.dyndns.net. (Important to remember the trailing dot)

Then any request to www.yourdomain.com will automatically go to the dyndns name.

I did then when I was running a webserver behind my firewall at home; forwarded the ports through to the backend server and used one of those dynamic DNS servers to ensure I always had the right IP resolution.

Or am I missing something?

BankruptcyRules

Born

Posts: 2

3+ Months Ago

Apache: Seting up virtual servers on my local machine for access from other computers in my LAN

I am running Apache 2.2 on XP. I want to set up Apache so that I have different test sites (each listening on a different port), to be accessed by other machines on my internal (home network).

I have managed to setup different virtual hosts (all using port 80), I have then used the host file to provide server names like:

This works fine on my local machine, in that I can acces http://phpmyadmin.localhost/ (for example, on my local machine. However, when I go to another machine I cannot type http://phpmyadmin.localhost/ I can only type http://[server.ip.address] which in this case, gives me the first website listed in my httpd.conf file.

I have two (possibly related) questions

1. What do I need to do so that I can access http://phpmyadmin.localhost/ from another machine in the LAN (is it simply a case of modifying the host file on each machine, or is it more complicated?) 2. How do I access a SPECIFIC website (on my local server), from one of the machines in my network, instead of being automatically assigned to the first wite listed in httpd.conf?