static images 404 on Windows
Chris Cortese
cortese.consulting at gmail.com
Sat May 9 12:25:39 MSD 2009
OK so I've tried everything I can think of on this one.
Running 0.7.55 on both Ubuntu Jaunty and XP. Jaunty works just fine.
On the Jaunty config, I do use rewrite to remap my js and css, but my
location /images/ directive is identical on Jaunty and XP, and the
latter 404's.
On XP, I can't get any of my static assets (/images, /css, /js) to load,
all 404. /css/style.php (see conf below) works fine as does all .php
code. This is a codeigniter site which explains the handling of index.php.
Note that I have web source under /cygwin for my convenience only but I
am not using any cygwin components in my stack, all native Windows
components.
Here's my latest version of the XP config:
server {
listen *:80;
server_name jobsite.xpdesktop;
access_log logs/jobsite.access.log;
error_log logs/jobsite.error.log;
root /cygwin/home/Chris/www/live/jobsite/trunk/html/public;
index index.php index.html;
location / {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME
c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public/index.php;
fastcgi_param QUERY_STRING q=$request_uri;
include fastcgi_params;
}
location ~ (jpg|jpeg|gif|png)$ {
}
location /images/ {
expires 30d;
}
location ~ /.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public$fastcgi_script_name;
fastcgi_param QUERY_STRING q=$request_uri;
include fastcgi_params;
}
location = /css/style.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME
c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public/css/style.php;
include fastcgi_params;
}
}
More information about the nginx
mailing list