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 01-11-2009, 06:01 PM   #1
mtlhd
Member
 
Registered: Sep 2007
Location: Florida
Distribution: Raspbian, Debian, CentOS, Ubuntu
Posts: 131

Rep: Reputation: 18
Debian fans, I need your help.... web server is killing my inner child.


I have moved from Fedora to Debian after reading poll after poll that debian was everyone's favorite. You lied! It's killing me! ;-)

I was on Fedora 8 which was ok, had some networking fights and got it right later on, then made the horrible mistake of moving to Fedora 10 where everything changed on me and setting up internet connections became a nightmare.

Enter Debian.

It connected to the internet without any problems off the bat, recognized all my hardware much better, (loving not working in 800 by 600 anymore) and was even able to set my static ip.

after all that, I saw APACHE2 instead, and more conf files to deal with, so ut oh.

I am at a loss. I can't get my website to work.

I am set up thru DYNDNS and it forwards to my IP here. Apache is listening to port 80 on the linux box's IP.

All I can get is ........................................

Not Found

The requested URL / was not found on this server.
.........................................................

I have included my config files, because going from Fedora 8's apache set up to Debian's apache2 set up was a change for me.

Where have I gone wrong?


*****************APACHE2.conf********************************************
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs-2.1/> for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "/var/log/apache2/foo.log"
# with ServerRoot set to "" will be interpreted by the
# server as "//var/log/apache2/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <URL:http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/apache2"
ServerName example.com
#

...changed nothing else....

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

*****************sites-enabled/000-default*******************************

NameVirtualHost example.com
<VirtualHost example.com>
ServerAdmin webmaster@localhost

DocumentRoot /home/me/www/website/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/me/www/website/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature Off

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

*******************ports.conf********************************************
Listen 192.168.1.149:80



THANKS IN ADVANCE LINUX COMMUNITY, help me stay on Debian, I like everything else so far!

-mtlhd
 
Old 01-11-2009, 07:09 PM   #2
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
I am not a Debian fan, having stood with Fedora since it began, but there are a couple of things to check:

1. Does your firewall configuration allow an incoming TCP connection to originate outside the firewall? Nowadays, many distibutions come preconfigured on the assumption that browsing (port 80) traffic will be originating with you, not from outside the Linux box.

2. DYNDNS is a way of redirecting your Domain Name to the (current) IP address, which may change frequently, depending on your ISP service. I think it does not automagically do Network Address Translation (NAT). But your apache configuration shows that your web server is listening on 192.168.1.149. That is a Private Networking address, which, unless your ISP is doing the NAT for you, is not a legal address on the public Internet. If you register that address as the target for your domain, no one will be able to reach your server, not because of any failing of the Debian software, but because the IP packets will be dropped without ceremony on the floor of the first public router that sees them. So I wonder if you have the right IP address for this purpose.
 
Old 01-11-2009, 07:34 PM   #3
mtlhd
Member
 
Registered: Sep 2007
Location: Florida
Distribution: Raspbian, Debian, CentOS, Ubuntu
Posts: 131

Original Poster
Rep: Reputation: 18
thanks for your reply

Yea DYNDNS points to my outside IP address, then my router gives my LINUX box an internal IP which I assigned 192.168.1.149 and have apache listening to port 80. It was how i set it up before...since i have a floating IP... goes from Go Daddy to DYNDNS to my router.

If I'm not misaken, is there something you can get that reports IP changes to DYNDNS so it stays with you?

I might be crazy on that one....

Fedora 8 was set up that way with all the same networking, but it only had one httpd.conf file which i miss.

My networking friends (im the dummy who went design and web dev) seem to have thought it was routed correctly. Im at a loss.
 
Old 01-11-2009, 09:09 PM   #4
jiobo
Member
 
Registered: Nov 2008
Posts: 180

Rep: Reputation: 36
Quote:
Originally Posted by mtlhd View Post
Fedora 8 was set up that way with all the same networking, but it only had one httpd.conf file which i miss.

My networking friends (im the dummy who went design and web dev) seem to have thought it was routed correctly. Im at a loss.
You can always go back to Fedora and back to networking school! Can your networking friends help you to get it to work?
 
Old 01-12-2009, 12:33 AM   #5
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
Here is some more detail on how Dynamic DNS works; it appears that perhaps your router is the agent that keeps the DYNDNS servers informed about your current IP address. You could check if this is working by going out to a coffee shop that has free wireless with your notebook, and try to ssh or ftp into your server. Of course, you would need to check that your firewall allows such connections, and that the corresponding service is running on your server. If that is working correctly, then we ought to look elsewhere for your webserver problem.

[ The Apache2 scheme of having a bunch of .conf files turns out to be a good deal more flexible, and not really that hard to deal with once you see what is actually happening. In the main httpd.conf file, there is at least one line that starts out with Include. The effect of this is to insert the contents of all the files referred to in that line into the configuration at that point. So what used to be a single flat configuration file is now just broken up into pieces.

One situation where this is particularly useful is if you have more than one DNS name for your website. In that case, you would need to define separate Virtual Hosts for each name, even though the content is the same. You can do this quite simply by keeping most of the Virtual Host definition in a single file, and then include that in a higher-ranking file that declares each ServerName followed by the common definition. ]

Here are a couple of additional questions that may point you to something:
1. Do you see the "...not found" response when you try to reach your web server from outside your local net, or only from within the local net, or only when you try to reach the webserver using the browser on the server machine itself. These are three distinct cases: one uses the external IP address, one might use the local IP address (192.168.1.149), and the third definitely will use the loopback address (127.0.0.1).
2. Are there any complaints in the apache error log?
3. Can you reach your web server by typing in a URL that specifies the IP address directly: http://ip.addr.ext.y?
4. What happens if you try to reach the web server using the internal IP address: http://192.168.1.149?
 
Old 01-12-2009, 08:55 AM   #6
mtlhd
Member
 
Registered: Sep 2007
Location: Florida
Distribution: Raspbian, Debian, CentOS, Ubuntu
Posts: 131

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by jiobo View Post
You can always go back to Fedora and back to networking school! Can your networking friends help you to get it to work?
NEVER! I hate networking, thats why I learned coding and design!!!!!!!!!!!!!!!!!!!!!!! ;-)
 
Old 01-12-2009, 09:12 AM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
let's start with the beginning.
Does the site works when you connect to it locally (from the computer itself)
Quote:
telnet 127.0.0.1 80
Then try to connect from anoter computer in your lan
Quote:
telnet 192.168.1.149 8
Then try to connect from outside your lan
Quote:
telnet your_externel_ip 80
Then try
Quote:
telnet your_dyndnsname 80
 
Old 01-12-2009, 09:19 AM   #8
mtlhd
Member
 
Registered: Sep 2007
Location: Florida
Distribution: Raspbian, Debian, CentOS, Ubuntu
Posts: 131

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by dkm999 View Post
[ The Apache2 scheme of having a bunch of .conf files turns out to be a good deal more flexible, and not really that hard to deal with once you see what is actually happening. In the main httpd.conf file, there is at least one line that starts out with Include.
Thats the crazy thing, httpd.conf is completely blank, but apache2.conf holds all the info.... does all the necessary info need to be in httpd.conf instead?

Thanks for the other suggestions as well, when I return home from work I will try everything...

THANKS!

-mtlhd
 
Old 01-12-2009, 09:38 AM   #9
mtlhd
Member
 
Registered: Sep 2007
Location: Florida
Distribution: Raspbian, Debian, CentOS, Ubuntu
Posts: 131

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by repo View Post
let's start with the beginning.
Does the site works when you connect to it locally (from the computer itself)

Then try to connect from anoter computer in your lan

Then try to connect from outside your lan

Then try
Thanks friend, I will try it when I get home today.
 
Old 01-12-2009, 12:01 PM   #10
rsciw
Member
 
Registered: Jan 2009
Location: Essex (UK)
Distribution: Home: Debian/Ubuntu, Work: Ubuntu
Posts: 206

Rep: Reputation: 44
Quote:
Originally Posted by mtlhd View Post
If I'm not misaken, is there something you can get that reports IP changes to DYNDNS so it stays with you?
Many routers have a function specifically for that nowadays, but have to activate it and set it up there.

httpd.conf is empty by default with how debian handles apache2, and is instead in different files & folders.

Not sure if an IP address is needed in ports.conf
I just have
"Listen <port number>"
for my ports, and works for them all (also dyndns port forwarding
via router to my apache2 on debian )
 
Old 01-12-2009, 12:03 PM   #11
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
If I'm not misaken, is there something you can get that reports IP changes to DYNDNS so it stays with you?
http://www.dyndns.com/support/clients/
 
Old 01-12-2009, 12:05 PM   #12
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
Quote:
Thats the crazy thing, httpd.conf is completely blank, but apache2.conf holds all the info.... does all the necessary info need to be in httpd.conf instead?
As with most things software-ish, "it depends". On Fedora systems, and according to the man page for the server, the default filename for the Apache configuration is conf/httpd.conf. That said, though, there are two ways that your system might be different:

1. The source code may have been edited to change the name of the default config file, and then recompiled for your distribution (this is open source code, after all).

2. There is a command-line parameter (-f) that allows run-time specification of the configuration file. The startup script on your Debian distribution might take advantage of this to specify a different filename and path. You can see if this is the case by looking at the way the server is invoked
Code:
# ps auxf | grep httpd
This will give you a listing of all the process threads named httpd. Probably only one of them (the parent of the others) will have any command-line parameters.

In either case, since you find that the file apache.conf contains the basic configuration info, treat it as the base file into which other stuff may be Included.

PS: a minor correction to the posting by repo. All the IP address-based checks (he recommends using telnet) should be to port 80. I guess a typo slipped by him (her?) in the second test line.
 
Old 01-14-2009, 10:21 PM   #13
mtlhd
Member
 
Registered: Sep 2007
Location: Florida
Distribution: Raspbian, Debian, CentOS, Ubuntu
Posts: 131

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by repo View Post
let's start with the beginning.
Does the site works when you connect to it locally (from the computer itself)

Then try to connect from anoter computer in your lan

Then try to connect from outside your lan

Then try
well, the only thing that worked was telnet to itself at 127.0.0.1 80 no other machine could connect to it.

Not even my windows computer on the same network.
 
Old 01-15-2009, 02:45 AM   #14
madman_lxl
LQ Newbie
 
Registered: May 2005
Location: Melbourne
Distribution: Debian, Ubuntu, Openfiler,
Posts: 14

Rep: Reputation: 1
if your having issues and this server is a from scratch build try this guide http://www.howtoforge.com/perfect_setup_debian_etch just ignore the ISP config (i dis-like ISP config's feature set but u can try it) and anything else you doing want. and install webmin for ease of maintenance through a webpage.

just a thought to make life easier.
 
Old 01-15-2009, 04:07 AM   #15
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
well, the only thing that worked was telnet to itself at 127.0.0.1 80 no other machine could connect to it.
Any firewall ?
 
  


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
memory leak: Parent killing child process wkhoo Programming 12 06-04-2008 05:39 PM
does killing child processesreduce CPU load average?? expeliarmus Linux - Newbie 1 08-02-2007 12:52 AM
does killing child processes reduce CPU load average?? expeliarmus Linux - General 2 08-02-2007 12:43 AM
Killing a child process from another child marri Programming 6 10-01-2004 07:08 PM
Killing child process coolfrog Programming 3 09-28-2004 02:58 PM

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

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