[SOLVED] Debian fans, I need your help.... web server is killing my inner child.
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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/
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>
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>
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.
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.
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?
[ 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...
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 )
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.