Ubuntu lamp server setup domains

  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

I really can't find the specifics I want when dealing with ubuntu lamp and setting up domains.

I had a spare computer laying around and I loaded ubuntu 8x and I really like it. I installed apache, mysql, php and phpadmin, and a firewall. I can run php scripts in my vars/www/ folder and access it only on my other computers that are connected to the router by using the assigned dhcp ip from my router for my ubuntu machine. So, a little insight into my setup is I simply have a cable modem that feeds my wireless router which has dhcp enabled. My unbuntu computer is hardwired to the router.

I guess I should setup a static ip which I need help with and open port 80 on my router which I also need help with. I read some stuff about dynamic dns services but am unsure. I like the idea of a static ip more.

The other thing is how do I start hosting sites. Would each site have a folder in the vars/www folder? I bought a domain name that I would like to host and I have another that I will soon like to host. So, how do I host/setup/configure multiple domains on my ubuntu server? I have one domain that will host a family reunion and the other domain will be one to host a high school reunion so i do not plan on a whole lot of traffic.

My websearches just aren't hitting the mark so if someone could go thru the next steps I need in order host my domains and make my server live or provide me a link with a good walkthru will be a lot of help. Many thanks in advance.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

While it is totally possible to host your own site at home, lots of people don't recommend it. Residential internet connections are meant mostly for downloading rather than uploading, so with only one site on your own server you would probably be alright. But once you get multiple sites and each of them is getting hits, you'll end up maxing out your bandwidth. For example, at my apartment I have DSL at 1.5M download and 768k upload. So that would work if I wasn't planning on having lots and lots of visitors, like if you were going to have family members look at vacation pictures or something. But if you were running an online retail store or going to stream videos or something, it might be wise to use a hosting service.

But we can still make this work for you though, no worries! We'll probably need the exact make and model of your modem and router. Basically what we'll do is set up a routing statement so that anything coming in on port 80 will go straight to the IP on your server. It might be a good idea to put your other home computers on their own subnet too, and create a DMZ for the server.
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

Interesting points. I'll keep those in mind.

I'm behind a linksys wireless G WRT54G v.3.

Thanks so much for your help.

I'll be working alot next week so I won't be able to try and reply to your steps until late in the evenings cental time. Please bear with me.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

so your local ip's are probably 192.168.1.*, correct? if so, point your browser to 192.168.1.1 (if not, replace the number in the 3rd spot with the appropriate one for your network). login to your router, the default pw should be admin or administrator if you haven't gotten in there and changed it. sometimes they'll have a username of admin or administrator as well, but mine has no username; just a password. then click on the "applications & gaming" tab. the first sub tab should be 'port range forward'. if you dont want to put your server in the DMZ (de-militarized zone, basically the router will allow access on any ports to that computer), then this is the area where you're going to setup the port forwarding. for the application box you can give it any name you want: server, ubuntu, sweetapples, whatever. for the start and end boxes, simply enter the number 80. set the protocol to TCP and enter the IP Address of the server. then click the check box for the 'enable' column and save your changes.
in your router, under the first tab that you're presented with after logging in titled 'Setup', there is a DDNS sub tab, which has dyndns.org as an option. it will then ask you to enter you username, password, and host name you use with dyndns. you should enable this once you setup an account. this is starting to become broken and i'm sorry, but i keep thinking of things as we go. :-X
the static ip address that i'm guessing you may be referring to would be inside your network which would be a good idea. this site shows you how to change your ubuntu setup from using dhcp to having a static ip address.

now, if the server is up and running, you should be able to access it from your ip address (the one outside your network). if you don't know what that is, http://www.whatismyipaddress.com will tell you ;] so you'd go to http://##.###.#.## (the #'s being your ip). you will want to use a dynamic dns service unless your ISP will allow you to have a static IP. but there really is no point in doing so imho. go to http://www.dyndns.org and you can sign up for their free dynamic dns service. all you have to do is login and update your ip every 45(?), i believe, days, and the service will remain active. you should be able to use the domain name you bought with this service.

have a look at this site and go through the setup steps for hosting multiple domains.

so that's a lot of stuff >< but post back if you have problems with anything or have more questions :]
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

I had EXACTLY what you just said on the tip of my tongue. ;)
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

You guys are great here at ozzu.

My local ips are 192.168.1.x.
I completely got all of that and will be working on it. I am familiar with my router so I followed along very well.


Let me take a look at the links provided and I'll let you guys know how things are going when I get a chance.
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

Good luck dude!
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

kc0tma wrote:
I had EXACTLY what you just said on the tip of my tongue. ;)

hahah yea..i figured as much >.< i just wanted to get to post before you ;P
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

you damn post thief. But seriously, I had that in mind I just wasn't at home so I wasn't sure exactly what to click on and stuff. I have the same wireless router at home, I think everybody probably has that one.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

hahah probably. the wmp54g is a pretty common wireless nic as well lol
although i didn't actually purchase the router, we get free internet with our apartment and it was sitting in our living room when we got here lol

..come to think of it, i didn't pay for the nic either.. (O_o) i acquired it from a friend that had an extra he didn't need, lol
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

Nothing can beat the price when it is free!

...unless someone pays you to take it, but only in a perfect world....
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

I'm poor. So, that's probably why the router is so common. More than likely it was the least expensive wireless router at the time, and nothing beats free.

Please let me know if this sounds right.
I signed up for dyndns. It seems the only thing to do is create a hostname to match to my router's ip using any of their host as a suffix which will be my nameserver for my domain I purchased??

Then, once I open port 80 and ddns my dyndns info.. I will be able to go to mydomain.com and it take me to vars/www??

I was very busy during the week. Thanks for staying with the post.

Ahh the weekend.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

you should look over this page on dyndns' site. basically what you want to do is login to dyndns, and then under My Services click Add Zone / Domains Service. for your zone name, enter whateveryourdomainis.com
then select the radio button that says Transfer domain to DynDNS. you want their custom dns, and then choose what you want for the email services (you can install an email server but configuring that is more of a mystery to me :-X). Once you've gone through this step, you just basically tell dyndns your ip and then with your router configured, your domain.com will point to your server and you'll be all set. it will display whatever you have in your /var/www/ folder.
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

I think that's all I needed. I should be good from here on out.

Thanks for all the help.

Post Information

  • Total Posts in this topic: 14 posts
  • Users browsing this forum: No registered users and 27 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.