修改/config/nginx.conf
加入路由设置 [code] location /static/ { alias static/; } [/code]
完整的配置文件,如下: [code] pid tmp/-nginx.pid;
This number should be at maxium the number of CPU on the server
worker_processes 4;
events { # Number of connections per worker worker_connections 4096; }
http { # use sendfile sendfile on;
# Va initialization
server {
# List port
listen ;
set $template_root '';
# Access log with buffer, or disable it completetely if unneeded
access_log logs/-access.log combined buffer=16k;
# access_log off;
# Error log
error_log logs/-error.log;
# Va runtime
// 在此处加入静态链接的设置
location /static/ {
alias static/;
}
} } [/code]