LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   I'm trying to set up my web server with Apache2 using Debain Linux. (http://www.linuxquestions.org/questions/linux-server-73/im-trying-to-set-up-my-web-server-with-apache2-using-debain-linux-497051/)

SimRacer 10-30-2006 05:15 PM

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.:scratch:

KenJackson 10-30-2006 07:01 PM

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.

SimRacer 10-31-2006 06:02 AM

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.

KenJackson 10-31-2006 10:03 AM

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.

SimRacer 11-02-2006 02:23 PM

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.


All times are GMT -5. The time now is 10:23 AM.