No MIME types

Peleke nginx-forum at nginx.us
Sat Jun 22 07:15:30 UTC 2013


I have just set up a Debian Wheezy nginx web server with PHP-FPM and while
it shows the hosted websites it doesn't analyse the MIME types and without
CSS or JS modern websites are not working.
The problem is the second domain.tld entry:

error.log:

2013/06/22 09:10:46 [error] 7806#0: *1 open()
"/var/www/domain.tld/htdocs/domain.tld/wordpress/wp-content/themes/twentytwelve/style.css"
failed (2: No such file or directory), client: 5.6.7.8, server: localhost,
request: "GET
/domain.tld/wordpress/wp-content/themes/twentytwelve/style.css?ver=3.5.1
HTTP/1.1", host: "1.2.3.4", referrer: "http://1.2.3.4/wordpress/"
2013/06/22 09:10:46 [error] 7806#0: *1 open()
"/var/www/domain.tld/htdocs/domain.tld/wordpress/wp-content/themes/twentytwelve/js/navigation.js"
failed (2: No such file or directory), client: 5.6.7.8, server: localhost,
request: "GET
/domain.tld/wordpress/wp-content/themes/twentytwelve/js/navigation.js?ver=1.0
HTTP/1.1", host: "1.2.3.4", referrer: "http://1.2.3.4/wordpress/"

How can I fix this?
Thanks

nginx.conf:

user  nginx;
worker_processes  4;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request"
'
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    gzip  on;

    include /etc/nginx/conf.d/*.conf;
}


default.conf

server {
    listen       80;
    server_name  localhost;
    root   /var/www/domain.tld/htdocs;

    #charset koi8-r;
    #access_log  /var/log/nginx/log/host.access.log  main;

    location / {
        index  index.php index.html index.htm;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    ##
    # Pass PHP-Files To Socket
    ##
             
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_intercept_errors off;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include /etc/nginx/fastcgi_params;
    }
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,240262,240262#msg-240262



More information about the nginx mailing list