LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-04-2004, 10:00 AM   #1
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
Question Setting up a Webserver


Hi guys,

I have a fixed IP address and a DNS address (both different

How do I configure Apache to run my webserver? If I don't get a domain name can
people from outside still access my website.
 
Old 02-04-2004, 10:17 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Without a domain name they could access it by IP, but it is certainly easier if you have a nice easy to remember domain name. There is extensive documentation on all the various features of apache and there configuration on Apache's HTTPD site. If you have specific questions on configuring a certain feature feel free to ask, but "How do I configure Apache to run my webserver" is quite vague and there could be hundreds of different answers you might be looking for.
 
Old 02-04-2004, 10:23 AM   #3
lone_nut
Member
 
Registered: Dec 2003
Location: Denmark
Distribution: Mandrake
Posts: 179

Rep: Reputation: 30
At least Red Hat (I can see, it is one of your distroes) comes with apache (the web server. to see if it is running, open your browser and type the following in as the address:
http://127.0.0.1
if you see anything but a error, you have already a web server running.
Then you need to locate the files of the web server. The files are sometimes placed in /var/www/html. sometimes not.
you may need to dig a little around.

If you get a error message, you need to install the apache rpms. Cheek all the Red Hat CD's and install all apache* packages you see fit.

good luck and happy hacking
 
Old 02-06-2004, 08:18 AM   #4
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Original Poster
Rep: Reputation: 45
OK guys so I did a few things. Now here's the scene.....

# Portions of my httpd.conf

Listen *:80

ServerName localhost
ServerName 61.16.150.118

DocumentRoot "/var/www/web"

#############################

Now this is my
/var/www/web/index.html

<HTML>
<Body>
<B>Hello Web!</B>
</Body>
</HTML>

Now I do a: service httpd start and get an [OK]

On opening 61.16.150.118 in the browser I get an error: "Connection was refused". So what's up?
 
Old 02-06-2004, 08:20 AM   #5
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Original Poster
Rep: Reputation: 45
For got to add that I do have a localhost set-up. It's supposed to do a DocumentRoot on /var/www/html. But I have commented it out for now.
 
Old 02-07-2004, 06:27 AM   #6
codedv
Member
 
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Quote:
Originally posted by LinuxLala
OK guys so I did a few things. Now here's the scene.....

# Portions of my httpd.conf

Listen *:80

ServerName localhost
ServerName 61.16.150.118

DocumentRoot "/var/www/web"

#############################

Now this is my
/var/www/web/index.html

<HTML>
<Body>
<B>Hello Web!</B>
</Body>
</HTML>

Now I do a: service httpd start and get an [OK]

On opening 61.16.150.118 in the browser I get an error: "Connection was refused". So what's up?
Firstly you need to make sure your web server is accessable via localhost.
http://127.0.0.1/

If that works then try and access it via your lan. That is if you are connected to a lan of course:
http://10.10.1.1/ <-- your IP address is probably different

If you get connection refused on the lan then your firewall is probably blocking inbound HTTP connections in which case you'll need to add the following rule to your firewall:
#iptables -I INPUT 1 -p tcp --dport 80 -J ACCEPT

Once you get it working through your lan try your static IP address. If that still doesn't work it might mean that your ISP is refusing conections on port 80. If that's the case you'll need to have Apache listen on a different port.
 
Old 02-07-2004, 12:56 PM   #7
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Original Poster
Rep: Reputation: 45
OK. Thanks codedv. I'll look into ur suggestions and post again if I am successful and even if I am not

Thanks
 
Old 02-08-2004, 03:02 PM   #8
Keeble
Member
 
Registered: Feb 2004
Location: El Paso, Texas
Distribution: Red Hat 9.0, Slackware 8.1, Mandrake 9.1,
Posts: 47

Rep: Reputation: 15
i get the same error when i try to find my server.
 
Old 02-09-2004, 03:47 AM   #9
GraemeK
Member
 
Registered: Aug 2003
Location: Essex, UK
Distribution: Windoze 2000, Fedora Core 3
Posts: 325

Rep: Reputation: 30
i skimmed this thread but is the apache webserver actually started? redhat doesnt start it by default...

you always get a connection refused if it isnt started.

G
 
Old 02-09-2004, 04:05 AM   #10
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
redirecting domains

You can get your own domain for free at www.dot.tk where you can register your domain and it will redirect users to your IP without showing them your IP. And it's free!
 
Old 02-09-2004, 09:44 AM   #11
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Original Poster
Rep: Reputation: 45
It gets started fine.
 
  


Reply



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
Setting Up Fedora WebServer aylwin_wong Linux - Networking 2 09-05-2005 03:55 AM
Setting up a small webserver, someone please help rookiepaul Linux - Newbie 4 07-05-2005 10:58 AM
setting up a webserver airmijo Linux - Newbie 6 11-15-2004 08:37 AM
Setting up a webserver fleeced Linux - General 1 09-04-2004 11:24 AM
Setting webserver enzolabrador Linux - Networking 1 08-26-2004 03:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:31 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
Open Source Consulting | Domain Registration