Nginx + PHPBB3 reverse proxy images problem
- by siberiano
Hello all I have a problem with my Nginx Frontend + Apache2 backend + PHPBB3 software. It doesn't load the CSS and the images neither.
I get constant errors like these:
2010/04/14 16:57:25 [error] 13365#0: *69 open() "/var/www/foo/styles/styles/coffee_time/theme/large.css" failed (2: No such file or directory), client: 83.44.175.237, server: www.foo.com, request: "GET /styles/coffee_time/theme/large.css HTTP/1.1", host: "www.foo.com", referrer: "http://www.foo.com/viewforum.php?f=43"
This is my config of the site:
server {
listen 80;
server_name www.foo.com;
access_log /var/log/nginx/foo.access.log;
# serve static files directly
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
access_log off;
expires 30d;
root /var/www/trasteando/;
}
location / {
root /var/www/foo/;
index /var/www/foo/index.php;
}
# proxy the PHP scripts to predefined upstream .apache. #
location ~ .php$ {
proxy_pass http://apache;
}
location /styles/ {
root /var/www/foo/styles/;
}