Something wrong with index:
It doesn't work out. The success one is like this:
The config of nginx is right. So, why can't I see the page with correct css style?
I finally get the answer.The reason is something wrong with my nginx. nginx before:
location / {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $uri =404;
}
nginx now:
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $uri =404;
}
That's the reason! I didn't handle those static resources forwarding right.So, the js/css files are transmitted to fastcgi ,and then they are all changed to txt.
Thanks for all volunteers under this question!Both of you really do great help to me~~