LinuxQuestions.org
Review your favorite Linux distribution.
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 10-30-2006, 05:15 PM   #1
SimRacer
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Rep: Reputation: 0
I'm trying to set up my web server with Apache2 using Debain Linux.


Hello, I'm new here and I'm trying to setup a web server for a web site that I'm creating. I have a few questions regarding Apache2 and FTP. 1st, I've been able to figure out, a little bit, on how to place html's into the /var/www/ directory although there may be a faster, more efficient way as I just copy and paste LOL. 2nd, I can view the web site on my LAN but internet users can't. I have a static IP with dyndns.org and finally, I would like to setup a directory so that gaming users who register with my web site, have the latest car skins. Kinda like Quake III Arena via FTP or, if it's more secure, via my web site.

Any ideas and/or suggestions?

Thanks.
 
Old 10-30-2006, 07:01 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
Quote:
I can view the web site on my LAN but internet users can't.
Do you have a firewall (a separate device)? If you do, you need to configure it to allow incoming traffic on port 80.

If you are directly connected with no firewall, you may need to change an internal firewall rule with iptables. This command will list all your iptables rules:
Code:
iptables -L
Finally, if you're stuck with an ISP that dictates how you may access the internet, they may permanently block incoming port 80 to prevent you from doing what you are doing. But not to worry, you can configure apache to listen to a different port (e.g. "Listen 0.0.0.0:8888") and then have dyndns redirect port 80 to the port you selected.
 
Old 10-31-2006, 06:02 AM   #3
SimRacer
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Firewall

Thank Ken for your reply. I am behind a Linksys Router which I have forwarded port 80 to the computer that is, in testing right now, on my LAN. I have also looked at the iptables you mentioned and this is the response I got:

ri-simracing:/home/david# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


Am I supposed to see any numeric information here?

Thanks again.
 
Old 10-31-2006, 10:03 AM   #4
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
No, it looks like iptables is not blocking anything.

If your router is forwarding port 80, then either the server isn't listening or the ISP is blocking port 80.

You might do this on the server to verify apache is running:
Code:
/etc/init.d/httpd status
It should respond with "Apache is running" and some PIDs.

You can also do this to verify the server is actually listening
Code:
netstat -tl
You should see "tcp 0 *:http *.* LISTEN" in the output.
 
Old 11-02-2006, 02:23 PM   #5
SimRacer
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by You might do this on the server to verify apache is running: [code
/etc/init.d/httpd status[/code] It should respond with "Apache is running" and some PIDs.
Hi Ken.
The above line didn't work. Replied with "no such file or directory" I replaced /httpd with /apache2 start and got a

bash: /etc/init.d/httpd: No such file or directory
ri-simracing:/home/david# /etc/init.d/apache2
Usage: /etc/init.d/apache2 start|stop|restart|reload|force-reload
ri-simracing:/home/david# /etc/init.d/apache2 start
Starting web server (apache2)...apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd (pid 9979) already running


[/quote]You can also do this to verify the server is actually listening
Code:
netstat -tl
You should see "tcp 0 *:http *.* LISTEN" in the output.[/quote]

These are the results of my netstat query:

Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:nfs *:* LISTEN
tcp 0 0 *:51234 *:* LISTEN
tcp 0 0 *:afpovertcp *:* LISTEN
tcp 0 0 *:swat *:* LISTEN
tcp 0 0 *:14534 *:* LISTEN
tcp 0 0 *:713 *:* LISTEN
tcp 0 0 *:netbios-ssn *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:auth *:* LISTEN
tcp 0 0 localhost:ipp *:* LISTEN
tcp 0 0 *:1047 *:* LISTEN
tcp 0 0 localhost:smtp *:* LISTEN
tcp 0 0 localhost:4700 *:* LISTEN
tcp 0 0 *:2397 *:* LISTEN
tcp 0 0 *:microsoft-ds *:* LISTEN
tcp6 0 0 *:www *:* LISTEN

Unfortunately, no :http listed. I apologize if I'm a little clueless about this. It is definatly different than working with Windows XP.

Thanks Ken.
 
  


Reply

Tags
apache2, debian, linux



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
Looking to set-up a Linux based web-server. SwapnilR Linux - Newbie 9 08-31-2006 08:54 AM
How2 let apache2 forward the request to another web-server on another machine boomy Linux - Software 9 12-04-2005 03:50 PM
'How to' guide to set up a Linux Web Server alortiz Linux - Newbie 3 09-13-2005 02:41 PM
Debain apache2 + php JJX Debian 9 08-10-2005 07:06 AM
Configuring the tree structure of a web server with apache2?? AQG Linux - Software 7 06-30-2005 03:47 PM

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

All times are GMT -5. The time now is 08:45 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