Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Feb 27, 2009 1:52 am 
Offline
Newbie

Joined: Wed Jan 21, 2009 2:23 pm
Posts: 4
EDIT: After thinking about this further I realized that my static.site.com logs were showing 1.0 hits which means they were going through the proxy. I changed my config to include a new server static.site.com and now it appears that nginx is serving my static files.

I just set up nginx reverse proxy and here is my config
Code:
location / {
        proxy_pass         http://127.0.0.1:8080/;
        proxy_redirect     off;

        proxy_set_header   Host             $host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_max_temp_file_size 0;

        client_max_body_size       10m;
        client_body_buffer_size    128k;

        proxy_connect_timeout      90;
        proxy_send_timeout         90;

        proxy_buffer_size          4k;
        proxy_buffers              4 32k;
        proxy_busy_buffers_size    64k;
        proxy_temp_file_write_size 64k;
    }

        location /assets {
                root   /var/www/site.com/htdocs/;
        }


I also have a subdomain at static.site.com where I have images stored.

From the logs of nginx it looks like it is serving everything including pages. This I know just isn't possible because I don't have any rewrites setup or fastcgi installed so it must be sending it to the proxy apache server.

But my question comes from nginx serving the files from static.site.com when it isn't set up to do that. How does that work? or is apache serving them and just not including it in the logs? My apache access log just shows access to the PHP files.

Thanks,

Gullah

nginx.log
Code:
*.*.*.*  - - [26/Feb/2009:22:12:15 -0600] "GET /assets/js/public/jquery.js$
*.*.*.*  - - [26/Feb/2009:22:12:15 -0600] "GET /assets/js/public/unravel.m$
*.*.*.*  - - [26/Feb/2009:22:12:15 -0600] "GET /assets/images/public/logo.$
*.*.*.*  - - [26/Feb/2009:22:12:16 -0600] "GET /artists/Beck/Beck_thumb.jp$
*.*.*.* - - [26/Feb/2009:22:12:16 -0600] "GET /users/drew.PNG HTTP/1.1" 2$
*.*.*.* - - [26/Feb/2009:22:14:11 -0600] "GET /home/index HTTP/1.1" 200 4$


apache.log
Code:
127.0.0.1 - - [26/Feb/2009:22:12:01 -0600] "GET /home/index HTTP/1.0" 200 4394 $
127.0.0.1 - - [26/Feb/2009:22:12:14 -0600] "GET /home/index HTTP/1.0" 200 4394 $
127.0.0.1 - - [26/Feb/2009:22:14:11 -0600] "GET /home/index HTTP/1.0" 200 4394 $


static.apache.log
Code:
127.0.0.1 - - [26/Feb/2009:23:53:15 -0600] "GET /users/drew.PNG HTTP/1.0" 200 6898 "http://www.unravelthemusic.com/home" "Mozilla/5.0 (Windows; U; Windo$



Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group