LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-28-2008, 06:35 PM   #1
bsctov
LQ Newbie
 
Registered: Apr 2008
Posts: 13

Rep: Reputation: 0
Apache on Kubuntu / Port forwarding


Hello guys, I am new to linux and just installed it on my extra computer which I have decided to turn into a small-scale web server. I installed Apache on it and we can connect to it locally but when we try to connect to it from outside of my network, I get a connection timed out error. I have set apache to listen on port 6621 because setting it to forward port 80 Causes serious problems and I get a "Router behind Router" error.

This text appears when i connect locally :

"Apache/2.2.4 (Ubuntu) Server at 192.168.1.72 Port 80" But in the file ports.conf I changed the listen port to 6621, Is there anywhere else I can change this?

Router is 3800HGV-B Gateway by 2WIRE

Thanks.
 
Old 04-28-2008, 06:39 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Are you running a firewall on Kubuntu? If so have you opened that the required port there as well?
 
Old 04-28-2008, 06:41 PM   #3
bsctov
LQ Newbie
 
Registered: Apr 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by {BBI}Nexus{BBI} View Post
Are you running a firewall on Kubuntu? If so have you opened that the required port there as well?
I have not personally installed a firewall onto the server nor am I aware of one coming pre-installed . But apache seems to want to listen on port 80 even though I set it to listen to 6621 in ports.conf for some reason.
 
Old 04-28-2008, 06:45 PM   #4
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
As far as I know, most GNU/Linux distros install a firewall by default. You also need to define your port in the httpd.conf file, then restart apache after doing so.
 
Old 04-28-2008, 06:55 PM   #5
bsctov
LQ Newbie
 
Registered: Apr 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Alright, In the new versions of apache, The Httpd.conf file is no longer used, it's only still present because some packages require its presence to function correctly, But I have copied the following into the httpd.conf file just in case:

Listen 6621

<IfModule mod_ssl.c>
Listen 443
</IfModule>


*EDIT- Turns out, putting ANYTHING into the httpd.conf file makes apache not even want to start.*

Last edited by bsctov; 04-28-2008 at 07:10 PM.
 
Old 04-28-2008, 07:57 PM   #6
fancylad
Member
 
Registered: Mar 2008
Distribution: slackware
Posts: 175

Rep: Reputation: 19
First check to make sure there are no syntax errors in any of your apache config files
Quote:
sudo apache2ctl -t
I'm running apache 2.2.3 and my config file is apache2.conf. In here I changed "Listen 443" to "Listen 4433", restarted apache, then confirmed that it was listening on that port by typing "sudo netstat -lnp | grep apache".
 
Old 04-29-2008, 12:41 AM   #7
bsctov
LQ Newbie
 
Registered: Apr 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Got everything running and exposed to the internet now. Only problem is that i put the Index.html file in the var/www directory and it works but it shows this ugly generic menu where it says "Index of /" And you have to click the apache folder to reach the site. Any idea on how I can make it go directly to the site instead of having to go through the ugly menu?
 
Old 04-29-2008, 03:59 PM   #8
bsctov
LQ Newbie
 
Registered: Apr 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bsctov View Post
Got everything running and exposed to the internet now. Only problem is that i put the Index.html file in the var/www directory and it works but it shows this ugly generic menu where it says "Index of /" And you have to click the apache folder to reach the site. Any idea on how I can make it go directly to the site instead of having to go through the ugly menu?
Any idea's on how to fix this?
 
Old 04-29-2008, 04:15 PM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well you presumably just have an incorrect documentroot setting of have just put your website in a subfolder. normally your main index.html/php/etc... would be in /var/www/html/ and that would also be the standard documentroot setting in httpd.conf, so at some point one of these things has been changed by yourself.
 
  


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 questions port forwarding jessemirza Linux - Newbie 4 12-13-2007 04:59 PM
apache proxy and port forwarding Furlinastis Linux - Networking 0 03-26-2007 10:42 AM
apache port forwarding. sraju Linux - Server 5 10-26-2006 06:16 AM
Apache port forwarding kg4ysy Linux - Software 2 06-14-2006 01:57 PM
Port Forwarding for Apache IlyaZ Linux - Networking 14 05-15-2005 04:41 AM

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

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

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