LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-29-2009, 11:28 AM   #1
bucovaina78
Member
 
Registered: Oct 2004
Location: Belgium / Antwerp
Distribution: Debian
Posts: 287

Rep: Reputation: 33
setting up a http server with apache


I'm trying to build a small website with Apache2.

If I type localhost in the firefox address bar it works but if I type my dyndns host address it doesn't work, after a while it just quits.

I've put configured port-forwarding for ssh and that works. So I added another forwarding line port 80 outbound, port 80 inbound to my local ip-address. But for some reason that doesn't work.


Nmap gives this reading:
Code:
Starting Nmap 4.76 ( http://nmap.org ) at 2009-03-29 18:21 CEST
Interesting ports on localhost (127.0.0.1):
Not shown: 997 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
80/tcp  open  http
631/tcp open  ipp
Device type: general purpose
Running: Linux 2.6.X
OS details: Linux 2.6.17 - 2.6.25
Network Distance: 0 hops
So I think my port 80 for http requests is open.

I think Apache is up and running fine because it's working on the local network (also from another host)

Code:
user@box:~$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                                                                               apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                                                        [ OK ]
user@box:~$
I don't know what that is but if apache is not running it doesn't show my website when I type localhost in firefox isn't it?

My best guess is that it's somewhere in the port forwarding, but that's exactly the same configured as my ssh line, I changed the port from 22 to 80.

Just to make sure: It's possible to run SSH and at the same time http, isn't it?
 
Old 03-29-2009, 11:36 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
do you have a router?
is the port forwarded at the router also?
please post the relevant lines of the firewall

you can see if port 80 is open via an online portscanner
 
Old 03-29-2009, 12:28 PM   #3
bucovaina78
Member
 
Registered: Oct 2004
Location: Belgium / Antwerp
Distribution: Debian
Posts: 287

Original Poster
Rep: Reputation: 33
the ports are open. I have a router set up for port forwarding (SSH works)

When I try in a terminal
Code:
ssh myself@address.homelinux.org
I can connect from anywhere.

When I try


Code:
http://address.homelinux.org:80
it doesn't work. When I try my own (external internet) IP-address literally It does work???

SSH with DNS = OK
HTTP with DNS = NOT OK

?????
 
Old 03-29-2009, 12:33 PM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
some routers have problems redirecting http requests from the inside to the outside and back.
Did you test from the outside?
 
Old 03-29-2009, 03:41 PM   #5
bucovaina78
Member
 
Registered: Oct 2004
Location: Belgium / Antwerp
Distribution: Debian
Posts: 287

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by repo View Post
some routers have problems redirecting http requests from the inside to the outside and back.
Did you test from the outside?
aha I didn't try that. I'll try it tomorrow from my job
 
  


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
Apache:Setting up two default page, one for http and one for https mmshekiba Linux - Server 1 07-13-2008 12:14 PM
Setting up Apache HTTP server anigma Linux - Networking 1 09-09-2006 02:29 PM
Setting up Apache HTTP server Micro420 Linux - Networking 32 03-26-2005 04:53 AM
Setting up HTTP server squirellplaying Linux - Newbie 8 05-02-2004 06:57 PM
Setting up Apache HTTP Webserver darklord75 Linux - Networking 6 04-19-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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