LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-28-2004, 08:47 PM   #1
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Rep: Reputation: 30
Exclamation how to set up a web server??


I want to set up a web server using apache. Im using redhat 9 and apache is installed and working. I have already bought a domain name and have been working on the website using quanta plus. After reading a few threads, I know I have to edit the http.conf file. This is a probably a stupid questions, but how do I go about doing this? Do I have to use emac or another similar program? If so can someone give me the steps to follow of point me to some documents that I can read. thanks in advance for your advise
 
Old 06-28-2004, 09:12 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
You can use any text editor to edit httpd.conf

Your best bet is to become familiar with the apache docs:
http://httpd.apache.org/docs-2.0/

You only need to edit a couple of things to get your server up and running. There are also hundreds of articles/tutorials on the web for getting apache running. My advice: have a google for "apache + tutorial"

If you have a specific problem then you can ask here.
 
Old 06-28-2004, 09:22 PM   #3
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
Yes, with linux its really easy to do this. If apache is installed, you can do "rcapache2 start" and the server starts. It answers at locahost:80. To stop it, I issue "rcapache2 stop". "rc..." stands for resource control, I guess.
If you have any firewall running you have to set it to leave port 80 open, in order to people have access to your server.
 
Old 06-28-2004, 10:29 PM   #4
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 30
thanks guys, i'll do some reading to learn more. If i have any problems, i'll come back and ask for help
 
Old 07-01-2004, 10:25 PM   #5
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 30
i've done some reading but there is alot of information regarding this topic. i still dont know how to edit the htpp.config file. here is what i've done so far. i tried to configure apache using the gui. went to Start->Systems Settings-->Server Settings-->HTTP Server, entered my password. Under Main
Server Name: <i gave it a name>
Webmaster email:<my personal email for now>
Available Addresses: <the domain name i bought:80>

Under Server
Lock File:/var/lock/httpd.lock
PID File: /var/run/httpd.pid
Core Dump Directory: /etc/httpd/

Im having problems when i try to ping my domain name. I get the following message:
"domainname could not be found". Can someone tell me what im doing wrong and/or how to fix it. Also, i have configured my firewall to allow HTPP it that makes any difference. Any advise will be appreciated
 
Old 07-01-2004, 11:02 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Available addressess probably should have an IP address, not a host name. In any case, I'd have just left that particular setting at the default -- it's probably correct. Anyhow, you're problem with ping is unrelated to the Apache Web server. Have you set up DNS (name resolution) for your domain yet? DNS maps a hostname like www.foo.com to a numeric IP address. Obviously, if this is not set up correctly, nobody will be able to use www.whatever.com to connect to your server. Setting up DNS varies, but generally you would just sign on with a DNS service (I believe that there are several free DNS services out there, but as I have my own DNS servers. I'm not familiar with any of them -- google should help here) and then you tell whoever you got your domain from what the authratative name servers are (usually this is done via some control panel you can sign on and access, contact the firm you got your domain from if you're having trouble).
 
Old 07-02-2004, 03:54 AM   #7
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,487

Rep: Reputation: 88
Hi

If you do not have DNS setup correctly in /etc/resolv.conf, you will not be able to ping your domain.

Have you tried pinging your IP adress directly?

If you want to ping using your domain name, first setup /etc/resolv.conf to contain the ip of a DNS server:

/etc/resolv.conf:

namesever 196.233.22.1 (or whatever)

THEN try to do a ping to your domain name. This will first lookup your domain's IP address, and then use THAT to ping. Or, if you are just testing, simply ping the ip address direct:

ping 196.2.122.3 (or whatever your registered domain's ip address is)
 
Old 07-02-2004, 07:56 PM   #8
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 30
thanks for all the tips. I did not have a DNS server set up. redhat comes with a DNS server so can i use it? also can anyone tell me what should i put in the Primary Name Server(SOA)
tab??any advise is appreciated
 
Old 07-02-2004, 09:19 PM   #9
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
You can run you're own authoratative name server, but I wouldn't recommend it. First off, every domain needs not one but two separate name servers for redundancy. Furthermore, each name server has to have a permanent static public IP address (so people always know where to look up authoratative information about a particular domain). Most DSL and Cable companies assign IP addresses dynamically, so machines on their networks cannot be name servers. Configuring DNS properly is a non-trivial task (believe me, I've f'ed things up with t before) above and beyond all that, so you're best off doing as I suggested and finding someone else to handle the DNS for your domain, unless you really feel some pressing effort and want to expend the energy setting it up yourself.

Now it is easy to set up DNS locally as a caching-only nameserver (that is it looks up domains and stores their information). You do not need a static public IP address for this. But my understanding is that you need an authoratative server for your domain, not a server to look up www.linuxquestions.org for instance.
 
Old 07-02-2004, 09:46 PM   #10
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 30
thanks fo the advise btmiller. I currently have dsl, so i guess running a name server from my box is not a posibility. can you recommend a free dns server that i can use?
 
Old 07-03-2004, 01:53 AM   #11
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
As I said, I have my own DNS setup, so I'm not too familiar with this, but I've heard good things about ZoneEdit -- http://www.zoneedit.com/ so you may want to give them a try. Googling for "free dns server" provides a lot of results, so you may want to search through that. Before you do so, check and make sure that the people you registered your domain service don't offer something like this for free.
 
Old 07-07-2004, 09:52 PM   #12
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 30
After reading some more, I still have not been able to get apache up running. Here is what I've done so far. I have set a DNS account with zoneedit.com. Edited the etc/resolv.config file to include the IP of a DNS server. I have edited the httpd.conf file to include the same ip address of the DNS server(I dont know if this is right). I have placed my html files in the var/www/html directory. Everytime I try to ping www.mydomain.com , I get the following two messages

If I type mydomain.com==>connection refused by domain.com

If I type www.mydomain.com==> domain not found.

Obviously I'm not doing something right. Can someone please tell me what are the lines that Im supposed to edit in the httpd.confi file ? and anything else that needs to be changed in order to get apache up and running. Thanks in advance for your help
 
Old 07-07-2004, 10:14 PM   #13
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
First thing to understand is that Web and DNS are totally separate services. Your Web server doesn't need to know what your DNS server is. Your DNS server does, however, need to know where your Web server is (so whenever somebody looks up www.mydomain.com it knows where to tell them to go). So there are a couple of different issues here, firstly whether or not your DNS is set up right and secondly whether or not your Web server is configured correctly. So let's tackle each problem in turn:

First, the DNS setup: What's your current IP address? Whatever it is www.mydomain.com should point to it. Try nslookup www.mydomain.com from Windows or Linux (a ping also reports the IP address) and see if it resolves correctly to your IP address. I suppose I should've realized their, being on DSL, your IP is liable to change, so you might want to look into a dynamic DNS service (hopefully Zoneedit has something like that) that automatically updates your IP in the nameserver configuration when it changes. But that's a bit in the future, the point right now is to see whether www.mydomain.com is resolving correctly.

Secondly: your Web server configuration. Can you get to your Web server by IP address from your internal LAN (if you have one) and from anywhere else on the Internet? Try connecting to your Web server by IP address from a couple different places (both on and off your LAN -- again, if you have a LAN) and see if things work. If so, the problem is just with the name resolution and solving that will solve your problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set up a web server? txprogrammer Linux - Newbie 6 08-26-2005 07:47 AM
How do i set up a web server flamah Linux - Newbie 19 05-25-2004 09:27 PM
how to set up a web server sameermanagoli Linux - General 1 06-26-2003 09:35 PM
How to set up a web server with pc Z28kid Linux - Newbie 13 01-16-2003 10:13 AM
Set up Web Server? lax2sman Linux - Newbie 3 02-11-2002 11:09 PM


All times are GMT -5. The time now is 12:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration