Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:, server:, request: "GET /styles/coffee_time/theme/large.css HTTP/1.1", host: "", referrer: ""

This is my config of the site:

server { listen 80; server_name; 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/foo/;

    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/;
share|improve this question
up vote 0 down vote accepted

I fixed the problem. It was kinda noob-problem, wrong paths :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.