![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Chocolate-Covered Ubuntu Beans
![]() Join Date: Mar 2006
Beans: 2,142
Ubuntu 9.10 Karmic Koala
|
HOWTO: Setup an Apache Web Server For Free ($0)
So here's what I did to get an Apache Web Server running in my house. I setup a very basic but totally cost-free server. Note: This guide is not for setting up LAMP servers (Linux, Apache, MySQL, PHP/Perl/Python), as I didn't need to run a database or scripting for my small website, so all we're using here is Ubuntu Linux and Apache Server.
1. Install the latest Ubuntu Server Edition on the computer you're setting up as a server. A great guide on these steps is here. Make sure to not select anything in the software selection screen (where it asks if you want to install a LAMP server, an Email server, etc.), unless you know what you're doing. 2. Now go to http://dyndns.com and make an account; I signed up for the Dynamic DNS service (because it's completely free) and made a hostname (my personal URL). Free hostnames cannot be top-level domains, such as yahoo.com, but you can make one like mydomain.dyndns.org) You may already have a hostname; in that case, you might want to sign up for the Custom DNS service, or also if you want to buy your own top-level domain (for ex. mydomain.com instead of a lower level domain such as mydomain.dyndns.org). All the information you need to set up all the DynDNS stuff is at their website. 3. Log into your server, and install Apache and the DynDNS client: Code:
sudo apt-get install apache2 ddclient Now you have to restart the ddclient: Code:
sudo /etc/init.d/ddclient restart You will need to change a few settings, including port forwarding port 80 to the static IP address that you're going to give your server (use the alternate ports 8080 or 8090 if you know that your ISP blocks port 80 by default). You also have to make sure that the DHCP address range of the router does not conflict with the future static IP address you'll assign your sever. That means that if your DHCP hands out IP addresses starting at 192.168.1.100 till 192.168.1.110, then you'll want your static IP address of your server to be somewhere above that, like 192.168.1.125 If there is a DynDNS setting in your router (linksys has one, it calls it DDNS) then you should put your DynDNS account settings there. 5. Now we'll set the server to have a static IP address (assuming you went with 192.168.1.125 and that your router's IP address is 192.168.1.1): Code:
sudo nano /etc/network/interfaces Code:
auto eth0 iface eth0 inet dhcp Code:
auto eth0 iface eth0 inet static address 192.168.1.125 netmask 255.255.255.0 gateway 192.168.1.1 Code:
sudo /etc/init.d/networking restart 6. If your ISP blocks port 80, then you have to change the default Apache config file: Code:
sudo nano /etc/apache2/ports.conf Code:
sudo /etc/init.d/apache2 restart In dyndns.com, you can use their "webhop" service (also free, just make another hostname) to redirect the host name you have (with the :8080) to a nicer looking one. For example, you could tell people your URL is name.dyndns.org but it redirects to the one with the :8080. You can also "cloak" your website so that when you redirect, say, name.dyndns.org to name.home.dyndns.org:8080, it still shows name.dyndns.org in the address bar; the only bad thing about this is that you'll be stuck with a DynDNS banner at the top of your website. 8. Reboot, just to make sure everything is okay: Code:
sudo reboot 9. (optional) If you want to easily transfer files from your windows box to your ubuntu server, use this guide: (it worked for me) http://ubuntuforums.org/showthread.php?t=202605 This is great for updating your website files in /var/www. Thanks to everyone who helped me with all of this, especially p_quarles, dfreer, and crashmaxx.
__________________
My Guides: Make DVD Videos | Install/Remove Desktop Environments | Install HP Printers | Find Your Installed Applications | Setup an Apache Web Server Last edited by ubuntuman001; February 10th, 2009 at 08:47 PM.. |
|
|
|
|
|
#2 |
|
Chocolate-Covered Ubuntu Beans
![]() Join Date: Mar 2006
Beans: 2,142
Ubuntu 9.10 Karmic Koala
|
Re: HOWTO: Setup an Apache Web Server For Free ($0)
tech9, rouge568, and alwiap you wanted me to tell you how everything went for me, and as you can see I got it all to work, so if you want to follow this guide but have any questions, let me know.
__________________
My Guides: Make DVD Videos | Install/Remove Desktop Environments | Install HP Printers | Find Your Installed Applications | Setup an Apache Web Server |
|
|
|
|
|
#3 | |
|
100% Pure Ubuntu
![]() Join Date: Sep 2007
Location: 010101010101001101000001
Beans: 857
Ubuntu 9.10 Karmic Koala
|
Re: HOWTO: Setup an Apache Web Server For Free ($0)
Quote:
![]() Thank you for taking the time to put this guide together! I am going to build a box/server special and dedicate it as an Apache Web Server ... powered by Ubuntu! ![]() |
|
|
|
|
|
|
#4 | |
|
Chocolate-Covered Ubuntu Beans
![]() Join Date: Mar 2006
Beans: 2,142
Ubuntu 9.10 Karmic Koala
|
Re: HOWTO: Setup an Apache Web Server For Free ($0)
Quote:
![]()
__________________
My Guides: Make DVD Videos | Install/Remove Desktop Environments | Install HP Printers | Find Your Installed Applications | Setup an Apache Web Server |
|
|
|
|
|
|
#5 | ||
|
Chocolate Ubuntu Mocha Blend
![]() Join Date: Jan 2006
Beans: 1,843
Ubuntu 7.10 Gutsy Gibbon
|
Re: HOWTO: Setup an Apache Web Server For Free ($0)
Very nice guide ubuntuman001, and congrats on getting your webserver up and running!
Quote:
Code:
pid=/var/run/ddclient.pid protocol=dyndns2 use=if, if=eth0 server=members.dyndns.org login=myusername password='mypassword' mydomainname.com Code:
use=web, web=checkip.dyndns.com/, web-skip='IP Address' Other useful things to add (see http://www.dyndns.com/support/kb/usi..._services.html for more details): Code:
syslog=yes ## logs information to /var/log/messages mail-failure=root ## you can replace this with your username if you wish wildcard=YES ## useful if you checked the "Use Wildcards" option, may not be available for the Free Dyndns service custom=yes, yourdomainname.com ## add the custom=yes option if you are using the "Custom DNS" service Quote:
Code:
Listen 8080 Just my two cents
__________________
Skype Beta for Gutsy AMD64 | pSX for AMD64/i386 | ZSNES for AMD64/i386 | Ubuntu Guide | dfreer.org Last edited by dfreer; December 13th, 2007 at 11:58 PM.. |
||
|
|
|
|
|
#6 | |
|
Ubuntu Extra Shot
![]() Join Date: Aug 2005
Location: Sydney, Australia
Beans: 361
Ubuntu Development Release
|
Re: HOWTO: Setup an Apache Web Server For Free ($0)
Quote:
Code:
sudo nano -w /path/to/file Code:
# ~/.bashrc export EDITOR="nano -w" Code:
$ man sudoedit $ sudoedit /path/to/file
__________________
Just another Perl hacker, Last edited by tr333; December 13th, 2007 at 10:45 PM.. |
|
|
|
|
|
|
#7 |
|
Way Too Much Ubuntu
![]() Join Date: Feb 2007
Location: detroit
Beans: 248
Ubuntu 8.04 Hardy Heron
|
Re: HOWTO: Setup an Apache Web Server For Free ($0)
I'm starting to do this right now, so I'll let ya know how it goes!
![]()
__________________
go wings geaux tigers go pistons
linuxmint/XP desktop/laptop, nokia n800 ( os2008 ) |
|
|
|
|
|
#8 |
|
Chocolate-Covered Ubuntu Beans
![]() Join Date: Mar 2006
Beans: 2,142
Ubuntu 9.10 Karmic Koala
|
Re: HOWTO: Setup an Apache Web Server For Free ($0)
alright, let me know if you're having any issues...
__________________
My Guides: Make DVD Videos | Install/Remove Desktop Environments | Install HP Printers | Find Your Installed Applications | Setup an Apache Web Server Last edited by ubuntuman001; December 26th, 2007 at 08:34 PM.. |
|
|
|
|
|
#9 |
|
Midnight Commander
![]() |
Re: HOWTO: Setup an Apache Web Server For Free ($0)
All right, so just last night, my ISP decided to suddenly block my inbound port 80. Gah. Anyway, I remembered this tutorial, and followed the instructions for using webhop. Working nicely, thanks.
The problem: I seem to have to choose between two less-than-ideal options with this service. If I don't check the "cloak" box in the webhop setup options, the DNS server points to my site properly, but displays my IP address + port number rather than the URL. If I do check the "cloak" option, it displays the URL . . . as well as a banner advertising DynDNS's webhop service. Yeah, I know there's only so much you can expect from a free DNS, but does anyone happen to know a way around this?
__________________
I am aware of all internet traditions. | Getting the best help | Text formatting codes | My last.fm profile Should I PM support questions? NO! |
|
|
|
|
|
#10 | |
|
Chocolate-Covered Ubuntu Beans
![]() Join Date: Mar 2006
Beans: 2,142
Ubuntu 9.10 Karmic Koala
|
Re: HOWTO: Setup an Apache Web Server For Free ($0)
Quote:
I know it looks sort of ugly, but it is the lesser of two evils, sotospeak (I think at least)
__________________
My Guides: Make DVD Videos | Install/Remove Desktop Environments | Install HP Printers | Find Your Installed Applications | Setup an Apache Web Server |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|