basicchannel Posted May 10, 2012 Posted May 10, 2012 Hi, I have inherited an Ubuntu 10.04 web server which is currently serving our school website, helpdesk and Moodle. It's fairly robust all things considered, but I'm having problems with certain local clients timing out when they try to access our school website for no apparent reason. It seems pretty random, and it's currently affecting my machine. All other websites are fine, it's just any sites hosted on our web server are a no-go. There isn't any real error message in the browser - IE just says 'Internet Explorer cannot display this webpage' and Mozilla just gives a generic web page timed out message. I initially thought it was our wireless connection as it seemed to affect laptops first, but my machine, and a few others are wired. Can anyone suggest any logs I can look at on the server itself, to see if there's any errors as to why it's refusing to deliver content? We are going to be migrating it soon to externally hosted, but that may not be for another couple of months. Thanks in advance
Jona Posted May 10, 2012 Posted May 10, 2012 On a redhat based box the relevant log file would probably be /var/log/http/error_log not sure if Ubuntu is the same. Might be worth restarting apache/httpd it could be that it's out of memory / some other resource. 1
hit Posted May 10, 2012 Posted May 10, 2012 (edited) Check the apache.conf file as well, could be a low number of forked child processes being allowed. If memory allows (use top to see what's happening real time) try increasing the number of maxclients and maxspareservers. An article here all about it: prefork - Apache HTTP Server Edited May 10, 2012 by hit 1
glennda Posted May 10, 2012 Posted May 10, 2012 login and type tail -f /var/log/apache2/error.log and then try and connect to the site from your computer and post up the errors which come out. 1
basicchannel Posted May 11, 2012 Author Posted May 11, 2012 Thanks for the suggestions guys. It seems like a basic restart of the apache service helped somewhat, although I'm going to look into the other suggestions later today. I shall report back ASAP.
basicchannel Posted May 16, 2012 Author Posted May 16, 2012 login and type tail -f /var/log/apache2/error.log and then try and connect to the site from your computer and post up the errors which come out. Done this, and the only error it seems to have is a 'File does not exist' error relating to a javascript news ticker embedded somewhere in our CMS (Joomla). I'm going to try @hit's suggestion and report back
glennda Posted May 16, 2012 Posted May 16, 2012 Might also be worth checking the /etc/apache2/sites-enabled/ virtual host file and check to see if there is any other error log specified.
Jawloms Posted May 16, 2012 Posted May 16, 2012 As a very simple check - does it still do it if you use the IP address instead of the name? I love to blame DNS for stuff....
glennda Posted May 16, 2012 Posted May 16, 2012 As a very simple check - does it still do it if you use the IP address instead of the name? I love to blame DNS for stuff.... if there is multiple sites on the host it will redirect to the first host on the server
basicchannel Posted May 16, 2012 Author Posted May 16, 2012 Might also be worth checking the /etc/apache2/sites-enabled/ virtual host file and check to see if there is any other error log specified. No other logs were specified - just the one I referenced previously As a very simple check - does it still do it if you use the IP address instead of the name? I love to blame DNS for stuff.... Unfortunately not. Interestingly I also get an error when I restart Apache. Restarting web server apache2 NameVirtualHost *:80 has no VirtualHosts apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName It then seems to OK it Thanks for all your help so far
glennda Posted May 16, 2012 Posted May 16, 2012 is there a dns entry for the actual server name? rather then an alias? it shouldn't make a difference tbh
camel Posted May 16, 2012 Posted May 16, 2012 are your virtual host directives (under /etc/apache2/sites-enabled) the same as the NameVirtualHost directive in the /etc/apache2/ports.conf file?
camel Posted May 16, 2012 Posted May 16, 2012 Also setting hostname of your server to the A record in DNS? hostname NEW_NAME will set the name for your server or edit the /etc/hostname file.
januttall Posted May 16, 2012 Posted May 16, 2012 are each of your sites set up as virtual servers inside apachie. if not look into setting this up verry useful feture then add the virtual server name to DNS with the destination as the ip address. it will auto route the trafic to the right vhost. if this is how its set up try looking into the apachie.conf file for min and max connection settings and children as often a child process is started for each set of (X)number of connections and it may not be starting corectly also you can set the max number of children in there. and how many connections a child must accept before creating a new process. it could also be a firewall or network card bottle neck so check howmuch trafic is being used from the server. our proxy runs on about 95Mbps in and out quite often, so we may have to put another in anyway to do this you can install iftop (sudo apt-get install iftop) and the command to run it is iftop this will give the current connections and how much bandwith the server is consuming. if its strugaling offloading some sites to another nic may be nessasery. or putting some load balencing in.
januttall Posted May 16, 2012 Posted May 16, 2012 Also setting hostname of your server to the A record in DNS? hostname NEW_NAME This dosent work properly on ubuntu machines, it looks like it does untill you reeboot and it goes back to the origanal name. some bug or other you have to eddit the /etc/hostname file personaly i would use nano but any text editor will work the command is (sudo nano /etc/hostname)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now