Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: My Local Apache Server is Not Refreshing Pages

  1. #1
    Join Date
    Mar 2007
    Beans
    118
    Distro
    Ubuntu 13.04 Raring Ringtail

    My Local Apache Server is Not Refreshing Pages

    I own several websites and have always developed on my local Apache server.

    I am in the middle of releasing a new product on one of my sites and have been making rapid changes to the site based on feedback from customers, etc. as my product has gone live...

    My local server is NOT refreshing pages. I make a change, click "refresh" in my browser and nothing happens.

    I have tried clearing my browser cache and it makes no difference. Eventually (several minutes later) my changes happen.

    Problem is, I need to be making these changes rapidly, and I really prefer to check my work on localhost before uploading it to a live server where I'm getting a lot of visitors right now.

    This is a very recent problem as I have never had this occur before. Running 10.04.

    Any help?
    Kristen - girly geek & mama to C, A, B, G, H, and C - our tiny Tux brigade!

  2. #2
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: My Local Apache Server is Not Refreshing Pages

    Try sending an HTTP request to your server directly, and see how it actually responds. This will narrow it down to either a client issue or a server issue.
    Code:
    echo -e "GET /path/to/changed/file HTTP/1.0\nHost: mydomain.com\n"|nc -q 1 127.0.0.1 80

  3. #3
    Join Date
    Mar 2007
    Beans
    118
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: My Local Apache Server is Not Refreshing Pages

    Thanks for your reply cdenly,

    Maybe I'm not getting something right with the syntax, because I'm getting a 404 Not Found error returned to me in the terminal.

    My page is at the root of my domain.

    So I have:

    Code:
    http://localhost.mydomain.com/nonupdatingpage.html
    I've tried several different things in the syntax you gave me but I'm apparently not putting it in right. Could you show how it should be using the example URL I gave above?
    Kristen - girly geek & mama to C, A, B, G, H, and C - our tiny Tux brigade!

  4. #4
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: My Local Apache Server is Not Refreshing Pages

    I am assuming you are running the command on the server itself, so the request would be sent to 127.0.0.1.
    Code:
    echo -e "GET /nonupdatingpage.html HTTP/1.0\nHost: localhost.mydomain.com\n"|nc -q 1 127.0.0.1 80

  5. #5
    Join Date
    Mar 2007
    Beans
    118
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: My Local Apache Server is Not Refreshing Pages

    well, that's one of the combinations I tried... Here's my output:

    Code:
    me@my-desktop:/var/www$ echo -e "GET /first-bites-and-beyond.html HTTP/1.0\nHost: localhost.naturalbirthandbabycare.net\n"|nc -q 1 127.0.0.1 80
    HTTP/1.1 404 Not Found
    Date: Fri, 16 Jul 2010 14:52:15 GMT
    Server: Apache/2.2.14 (Ubuntu)
    Vary: Accept-Encoding
    Content-Length: 328
    Connection: close
    Content-Type: text/html; charset=iso-8859-1
    
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>404 Not Found</title>
    </head><body>
    <h1>Not Found</h1>
    <p>The requested URL /first-bites-and-beyond.html was not found on this server.</p>
    <hr>
    <address>Apache/2.2.14 (Ubuntu) Server at localhost.naturalbirthandbabycare.net Port 80</address>
    </body></html>
    The page IS loading in Apache... it's just not updating...

    It's fine when I upload it to my live server so the problem isn't with something being messed up in my page's code. Something is going on with my local server.
    Kristen - girly geek & mama to C, A, B, G, H, and C - our tiny Tux brigade!

  6. #6
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: My Local Apache Server is Not Refreshing Pages

    Works fine for me.
    Code:
    echo -e "GET /first-bites-and-beyond.html HTTP/1.0\nHost: localhost.naturalbirthandbabycare.net\n"|nc -q 1 localhost.naturalbirthandbabycare.net 80
    Your server where you are running that command responds with a 404 error when receiving requests for /first-bites-and-beyond.html with host localhost.naturalbirthandbabycare.net on interface 127.0.0.1. I couldn't tell you why exactly unless you post your server configuration. Perhaps you should try sending it to a different network interface.
    Last edited by cdenley; July 16th, 2010 at 04:23 PM. Reason: copy/paste problem

  7. #7
    Join Date
    Mar 2007
    Beans
    118
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: My Local Apache Server is Not Refreshing Pages

    I'm not sure how to go about sending it to a different network interface. I can post any configuration files if you let me know what to post... otherwise I'm at a loss. I cut and pasted the command into the terminal so I know there are no typos.

    My server has finally updated the change I made close to 2 hours ago... really want to find out what's causing these delays
    Kristen - girly geek & mama to C, A, B, G, H, and C - our tiny Tux brigade!

  8. #8
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: My Local Apache Server is Not Refreshing Pages

    Code:
    echo -e "GET /first-bites-and-beyond.html HTTP/1.0\nHost: localhost.naturalbirthandbabycare.net\n"|nc -q 1 xxx.xxx.xxx.xxx 80
    Replace "xxx.xxx.xxx.xxx" with the IP address of the server's interface you wish to send it on.

  9. #9
    Join Date
    Mar 2007
    Beans
    118
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: My Local Apache Server is Not Refreshing Pages

    I tried sending it via the IP of the machine that I'm on now and got the same result Is that what you meant?
    Kristen - girly geek & mama to C, A, B, G, H, and C - our tiny Tux brigade!

  10. #10
    Join Date
    Mar 2007
    Beans
    118
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: My Local Apache Server is Not Refreshing Pages

    ok I got this figured out... I needed to specify the path after the GET... so I had to put:

    Code:
    echo -e "GET /naturalbirthandbabycare.net/first-bites-and-beyond.html HTTP/1.0\nHost: localhost.naturalbirthandbabycare.net\n"|nc -q 1 127.0.0.1 80
    This returned the page with these headers:

    Code:
    HTTP/1.1 200 OK
    
    Date: Fri, 16 Jul 2010 17:39:28 GMT
    
    Server: Apache/2.2.14 (Ubuntu)
    
    Accept-Ranges: bytes
    
    Vary: Accept-Encoding
    
    Connection: close
    
    Content-Type: text/html
    
    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    
    ...and so forth through my code...
    The page still isn't updating properly.
    Kristen - girly geek & mama to C, A, B, G, H, and C - our tiny Tux brigade!

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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