【发布时间】:2016-08-25 10:25:06
【问题描述】:
我正在使用 Ubuntu 14.04 的 nginx 主机
我的配置文件:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name testing.com;
location /site/admin/ {
alias /usr/share/nginx/html/site/admin/src/;
}
location ~ \.(css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}
我有一些错误
[error] 29224#0: *10047 open() "/usr/share/nginx/html/site/admin/assets/js/jquery.nestable.js" failed (2: No such file or directory)
实际上该文件位于:
/usr/share/nginx/html/site/admin/src/assets/js/jquery.nestable.js
如何设置我的配置文件?
【问题讨论】:
标签: file caching nginx ubuntu-14.04