Author Topic: How to Setup a webserver in RedHat 9?  (Read 1306 times)

jrich4

  • Newbie
  • *
  • Posts: 15
  • Kudos: 0
How to Setup a webserver in RedHat 9?
« on: 24 June 2003, 22:06 »
What all do I need to setup a webserver using RedHat 9? I have Apache running and am currently reading up on how to set it up. Right now I just want to setup my own webserver and webpage for family with pictures of our newborn daughter. Can I use port 80 or do I need to assign it something else. My ISP wants you to buy another account for running servers, but I just want to run a very small one for family to access with my current account. What is a good program for creating webpages in linux? Any info or tips would be greatly appreciated.

Thanks,
jrich4

Refalm

  • Administrator
  • Member
  • ***
  • Posts: 5,183
  • Kudos: 704
  • Sjembek!
    • RADIOKNOP
How to Setup a webserver in RedHat 9?
« Reply #1 on: 24 June 2003, 22:22 »
Port 80 would be great, unless you're behind a router. If you are, please say so.

Mozilla Composer is great to start. Try making a webpage with that.

xyle_one

  • VIP
  • Member
  • ***
  • Posts: 2,213
  • Kudos: 135
How to Setup a webserver in RedHat 9?
« Reply #2 on: 25 June 2003, 04:00 »
do you have a static IP address? if not you will need the srvices of dyndns.org or no-ip.com. both will help get around the no-static ip thing. To create web pages in linux, use mozilla composer or quanta.

jrich4

  • Newbie
  • *
  • Posts: 15
  • Kudos: 0
How to Setup a webserver in RedHat 9?
« Reply #3 on: 25 June 2003, 21:45 »
I have cable internet and a static IP. Also, I am behind a router, I have a few computers sharing the cable conncetion. I have been reading the Apache documentation, but wanted a few pointers from others that have used it. Thanks for the responses.

Thanks,
   jrich4

Faust

  • Member
  • **
  • Posts: 1,223
  • Kudos: 0
How to Setup a webserver in RedHat 9?
« Reply #4 on: 25 June 2003, 12:34 »
Im pretty sure Red Hat will have some nice configuration tool for apache as well.  Are you using that or doing it the masochistic editing configs way?  ;)
Yesterday it worked
Today it is not working
Windows is like that
 -- http://www.gnu.org/fun/jokes/error-haiku.html

jrich4

  • Newbie
  • *
  • Posts: 15
  • Kudos: 0
How to Setup a webserver in RedHat 9?
« Reply #5 on: 25 June 2003, 18:20 »
RedHat has a gui configuration tool, and I have played with it a little bit. I guess what I am really wanting to know is, how I am going to have to configure it since I am behind a router.

Thanks,
    jrich4

SAJChurchey

  • Member
  • **
  • Posts: 246
  • Kudos: 0
    • http://sajchurchey.htmlplanet.com
How to Setup a webserver in RedHat 9?
« Reply #6 on: 25 June 2003, 20:54 »
If RH already starts up httpd at boot, you can see if the initial configuration is working correctly.  Go to your browser and type in http://localhost.

You should get an apache test page if it works correctly.
SAJChurchey                    

Fett101

  • VIP
  • Member
  • ***
  • Posts: 1,581
  • Kudos: 85
    • http://fgmma.com
How to Setup a webserver in RedHat 9?
« Reply #7 on: 25 June 2003, 21:00 »
Just have the router forward port 80 to the webserver PC. And the Apache config is set up like any other apache config.

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
How to Setup a webserver in RedHat 9?
« Reply #8 on: 25 June 2003, 22:31 »
You can also try using Webmin to configure Apache. Just a thought.

solo

  • Member
  • **
  • Posts: 344
  • Kudos: 1
    • http://www.komodolinux.org/
How to Setup a webserver in RedHat 9?
« Reply #9 on: 26 June 2003, 01:52 »
Your ISP may block port 80 (like mine) to stop you from hosting web pages. More on this in a moment.

There are two ways to make your computer accessible to incoming connections (i.e. browsers looking at your webpage).
- Forwarding just port 80 (the safe way)
- Becoming the DMZ host (the dangerous way)

Becoming the DMZ host (can't remember what it stands for...) tells the router to forward all incoming connections to your computer. This means every internet service you have running on your computer will be exposed and will be accessible to anyone. This can be dangerous. The safe way is to tell the router to forward all connections to port 80 to your computer.

This process varies on different brand routers.
To access and configure your router you will need to access it via it's web-based interface. This is done by connecting to it in Netscape or Konqueror. You need to know the IP address of the router to do this.
Some routers use 192.168.0.1, some use 192.168.1.1, some use 10.0.0.1 etc. When you connect to the router you will be presented with an authentication window. Again, different routers have different usernames/passwords. I myself have a Linksys router, the default username is nothing (no username), and 'admin' as the password.
Consult your router documentation for specifics on the default IP address it uses as well as the authentication information.

Once you see the router configuration you should look for 'Advanced' setup or 'Port Forwarding' or something to that effect. If your router has an advanced page, you will need to locate 'Port Forwarding' on that page.
Here you will be able to enter the IP addresses on your local network to forward the connections to, as well as a place to enter the port range forwarded. you will want to enter your computer's local IP address and just enter port 80.

It's important to note that if you are using DHCP to retrieve IP addresses for the computers on your local network, you may have trouble with the port forwarding system, as your IP may change when you reboot or your computer reconnects to the router. If this is the case, you may need to use a hostname if your router supports it, or switch to static IP addresses).

If you don't know your computer's local network IP address you will need to open up a terminal and type
# /sbin/ifconfig
Note: In Redhat (at least in RH 9) you do not need to 'su' to be the root user to run ifconfig.

Probably under the connection 'eth0' your connection will be directly after 'inet addr:'.

To make sure it works, type your global IP address into your browser. If you see the Apache test page then your good to go. If you get 'Connection Refused' make sure Apache is running. If it is, and it works by entering 'http://localhost' in your browser, Port 80 may be blocked by your ISP. In this case, you will need to change the port Apache uses to serve pages. To do go to the Redhat menu->System Settings->Server Settings->HTTP Server and under the 'Available Addresses' group box click Add. Click 'Listen to all available addresses' and change Port to 8080 or 81 or whatever you want to use (be careful you aren't using some other services main port, just in case you ever decide to use those services). Click Ok, then Click OK in the main Apache Configuration window. I'm not sure if Redhat restarts httpd. If not, open up a terminal and type

# su
Password: <root pass>
# /etc/rc.d/init.d/httpd reload

That will tell Apache to reread it's configuration and reload itself. Again, enter your global IP address into your browser, but now append ':8080' (without the quotes) or whatever your port was that you added. If you see the test page, *now* your done   . If not, your ISP is psycho or port forwarding is not working properly. Try making yourself the DMZ host, you'll see it in the router prefs.
Komodoware, moving Linux to your desktop.
http://www.komodoware.com/

jrich4

  • Newbie
  • *
  • Posts: 15
  • Kudos: 0
How to Setup a webserver in RedHat 9?
« Reply #10 on: 26 June 2003, 20:02 »
Thank you for all of your help everyone. I am behind a Linksys router. My ISP blocks port 80, but I did like you said solo and put it at port 8080 for now. I can get to the Apache test page from any of my computers now. I guess that it is time to start creating the webpage now. Can I just type in the IP address and port into any computer's web browser connceted to the net and get to my webserver now?
Now that I have Apache up and running and can connect to it, how do I set it up with a hostname. So that someone can just type in ex.http://www.xxxxxxxxx.com and so forth? Do I need to configure Bind for that?

Thanks,
    jrich4

Fett101

  • VIP
  • Member
  • ***
  • Posts: 1,581
  • Kudos: 85
    • http://fgmma.com
How to Setup a webserver in RedHat 9?
« Reply #11 on: 26 June 2003, 21:18 »
Yeah. Typing in the ip and port and it will bring ya right to it from anywhere in the world. Spiffy.(if your told the router to forward 8080, of course)

Host name. You'll either have to register (for a fee) to get one of those spiffy .coms, or just use a dynamic dns, or cjb, to get some silly, (yet not as silly as an IP address) name, like fett101.mine.nu

solo

  • Member
  • **
  • Posts: 344
  • Kudos: 1
    • http://www.komodolinux.org/
How to Setup a webserver in RedHat 9?
« Reply #12 on: 26 June 2003, 21:34 »
godaddy.com

$9 for a domain name. If you decide to go that route you'll need the Public DNS project (granitecanyon.net). Making DNS entries is kinda confusing so we'll help ya if you decide to go that route   .
Komodoware, moving Linux to your desktop.
http://www.komodoware.com/