Answer the question
In order to leave comments, you need to log in
Why doesn't nginx render the css file completely?
Hello!
The next problem is that nginx gives away about 70-80% of the contents of the style files, while the size of the file does not interest it.
For example the following content
@font-face {
font-family: 'Roboto';
src: url('../fonts/Roboto-Italic-webfont.eot');
src: url('../fonts/Roboto-Italic-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/Roboto-Italic-webfont.woff2') format('woff2'),
url('../fonts/Roboto-Italic-webfont.woff') format('woff'),
url('../fonts/Roboto-Italic-webfont.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Roboto';
src: url('../fonts/Roboto-Italic-webfont.eot');
src: url('../fonts/Roboto-Italic-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/Roboto-Italic-webfont.woff2') format('woff2'),
url('../fonts/Roboto-Italic-webfont.woff') format('woff'),
url('../fonts/Roboto-Italic-webfont.ttf') format('truetype');
font-weight: normal;
font-style: it
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
client_max_body_size 200M;
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 /home/anton/server/conf/*;
}
server {
listen 80;
root /home/anton/server/www/mydomain/account;
index index.php;
server_name mydomain.lc;
location / {
rewrite ^/(.*)$ /index.php last;
}
location /static/ {}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Answer the question
In order to leave comments, you need to log in
The problem was not in nginx
Everything is arranged as follows:
1. MAC OS as a host system
2. Ubuntu on virtualbox as a web server
, the project files are on mac os and mounted on ubuntu as a shared folder, this is where the problem arose, what was saved on the poppy was crooked already displayed on ubuntu.
how to treat it is not clear, got out the organization of the scheme without a shared folder
Oddly enough, this can be called using nginx, and this has already happened when you force nginx to cache static content in this case, an interesting glitch associated with last modefight came out. As a result, a static file is displayed before the place of change;)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question