# No MIME types

**URL:** <https://www.ruby-forum.com/t/no-mime-types/235453>\
**Category:** NGINX\
**Created:** [June 22, 2013, 9:15am UTC](https://www.ruby-forum.com/t/no-mime-types/235453 "2013-06-22T09:15:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alcina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@alcina](https://www.ruby-forum.com/u/alcina)\
**Post date:** [June 22, 2013, 9:15am UTC](https://www.ruby-forum.com/t/no-mime-types/235453/1 "2013-06-22T09:15:59Z")

</div>

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/](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/](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:

> **[No MIME types](https://forum.nginx.org/read.php?2,240262,240262#msg-240262)**
>
> 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:...

---

<div class="post-metadata">

**Author:** ![Peleke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@Peleke](https://www.ruby-forum.com/u/Peleke)\
**Post date:** [June 22, 2013, 1:58pm UTC](https://www.ruby-forum.com/t/no-mime-types/235453/2 "2013-06-22T13:58:44Z")

</div>

On Sat, Jun 22, 2013 at 03:15:30AM -0400, Peleke wrote:

Hi there,

I’m not sure how your question matches the Subject: line you used.

But anyway…

> The problem is the second domain.tld entry:

> 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/](http://1.2.3.4/wordpress/)”

> How can I fix this?

I suspect that the answer is going to be “fix your wordpress”.

Does the file

/var/www/domain.tld/htdocs/wordpress/wp-content/themes/twentytwelve/style.css

exist (without the second “/domain.tld”)?

What is the output of

curl -i [http://1.2.3.4/wordpress/](http://1.2.3.4/wordpress/)

and does it include the string

/domain.tld/wordpress/wp-content/themes/twentytwelve/style.css?ver=3.5.1

anywhere? If so, what puts the “/domain.tld” at the start of it?

My guess is that the file does exist, and that the extra /domain.tld  
is added by your wordpress. In which case, find where it your wordpress  
config it is added, and don’t add it.

Good luck with it,

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Peleke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@Peleke](https://www.ruby-forum.com/u/Peleke)\
**Post date:** [June 23, 2013, 5:14am UTC](https://www.ruby-forum.com/t/no-mime-types/235453/3 "2013-06-23T05:14:23Z")

</div>

I have the same problem with other software (tested selfoss for example)  
even if I want to set it up completely from scratch.  
How can I find the root problem and fix it?

Posted at Nginx Forum:

> **[Re: No MIME types](https://forum.nginx.org/read.php?2,240262,240274#msg-240274)**
>
> 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:...

---

<div class="post-metadata">

**Author:** ![Peleke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@Peleke](https://www.ruby-forum.com/u/Peleke)\
**Post date:** [June 23, 2013, 2:25pm UTC](https://www.ruby-forum.com/t/no-mime-types/235453/4 "2013-06-23T14:25:13Z")

</div>

Sorry, you were right, didn’t see it in Selfoss because of SQLite.  
Thanks!

Posted at Nginx Forum:

> **[Re: No MIME types](https://forum.nginx.org/read.php?2,240262,240283#msg-240283)**
>
> 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:...
