+ Post New Thread
Results 1 to 15 of 15
Internet Related/Filtering/Firewall Thread, Local Web Server Brain-scratcher in Technical; Hi, I have inherited an Ubuntu 10.04 web server which is currently serving our school website, helpdesk and Moodle. It's ...
  1. #1
    basicchannel's Avatar
    Join Date
    May 2010
    Location
    Norfolk, UK
    Posts
    279
    Thank Post
    36
    Thanked 23 Times in 15 Posts
    Blog Entries
    1
    Rep Power
    23

    Local Web Server Brain-scratcher

    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

  2. #2
    Jona's Avatar
    Join Date
    May 2007
    Location
    Cranleigh
    Posts
    467
    Thank Post
    14
    Thanked 50 Times in 48 Posts
    Rep Power
    23
    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.

  3. Thanks to Jona from:

    basicchannel (11th May 2012)

  4. #3
    hit
    hit is offline
    hit's Avatar
    Join Date
    Mar 2008
    Location
    London
    Posts
    324
    Thank Post
    47
    Thanked 50 Times in 48 Posts
    Rep Power
    50
    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
    Last edited by hit; 10th May 2012 at 06:59 PM.

  5. Thanks to hit from:

    basicchannel (11th May 2012)

  6. #4

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,800
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    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.

  7. Thanks to glennda from:

    basicchannel (11th May 2012)

  8. #5
    basicchannel's Avatar
    Join Date
    May 2010
    Location
    Norfolk, UK
    Posts
    279
    Thank Post
    36
    Thanked 23 Times in 15 Posts
    Blog Entries
    1
    Rep Power
    23
    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.

  9. #6
    basicchannel's Avatar
    Join Date
    May 2010
    Location
    Norfolk, UK
    Posts
    279
    Thank Post
    36
    Thanked 23 Times in 15 Posts
    Blog Entries
    1
    Rep Power
    23
    Quote Originally Posted by glennda View Post
    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

  10. #7

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,800
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    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.

  11. #8

    Jawloms's Avatar
    Join Date
    Aug 2007
    Posts
    812
    Thank Post
    175
    Thanked 104 Times in 72 Posts
    Rep Power
    185
    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....

  12. #9

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,800
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    Quote Originally Posted by Jawloms View Post
    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

  13. #10
    basicchannel's Avatar
    Join Date
    May 2010
    Location
    Norfolk, UK
    Posts
    279
    Thank Post
    36
    Thanked 23 Times in 15 Posts
    Blog Entries
    1
    Rep Power
    23
    Quote Originally Posted by glennda View Post
    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

    Quote Originally Posted by Jawloms View Post
    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.

    Code:
    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

  14. #11

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,800
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    is there a dns entry for the actual server name? rather then an alias? it shouldn't make a difference tbh

  15. #12
    camel's Avatar
    Join Date
    Nov 2009
    Location
    east midlands
    Posts
    109
    Thank Post
    30
    Thanked 38 Times in 19 Posts
    Rep Power
    16
    are your virtual host directives (under /etc/apache2/sites-enabled) the same as the NameVirtualHost directive in the /etc/apache2/ports.conf file?

  16. #13
    camel's Avatar
    Join Date
    Nov 2009
    Location
    east midlands
    Posts
    109
    Thank Post
    30
    Thanked 38 Times in 19 Posts
    Rep Power
    16
    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.

  17. #14
    januttall's Avatar
    Join Date
    Sep 2010
    Posts
    225
    Thank Post
    17
    Thanked 28 Times in 28 Posts
    Blog Entries
    1
    Rep Power
    13
    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.

  18. #15
    januttall's Avatar
    Join Date
    Sep 2010
    Posts
    225
    Thank Post
    17
    Thanked 28 Times in 28 Posts
    Blog Entries
    1
    Rep Power
    13
    Quote Originally Posted by camel View Post
    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)

SHARE:
+ Post New Thread

Similar Threads

  1. Setting up a local web server to emulate SWGFL
    By Westfield_Techie in forum Internet Related/Filtering/Firewall
    Replies: 0
    Last Post: 21st June 2010, 12:27 PM
  2. ISA 2004 Publish Web Server Problem
    By Nij.UK in forum Windows
    Replies: 7
    Last Post: 30th November 2006, 09:48 AM
  3. web server stats
    By CyberNerd in forum How do you do....it?
    Replies: 9
    Last Post: 22nd September 2006, 08:57 AM
  4. security of internally hosted web server
    By Wizzer in forum Web Development
    Replies: 7
    Last Post: 27th June 2006, 08:50 PM
  5. back up web server
    By beeswax in forum How do you do....it?
    Replies: 6
    Last Post: 12th June 2006, 09:03 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •