opendevops
opendevops copied to clipboard
登陆界面不加载静态资源问题
若部署完成后,登陆界面无法加载姿态资源请确认以下配置, include mime.types;
cat /usr/local/openresty/nginx/conf/nginx.conf
user root;
worker_processes auto;
worker_rlimit_nofile 51200;
error_log logs/error.log;
events {
use epoll;
worker_connections 51024;
}
http {
#设置默认lua搜索路径
lua_package_path '$prefix/lua/?.lua;/blah/?.lua;;';
lua_code_cache on; #线上环境设置为on, off时可以热加载lua文件
lua_shared_dict user_info 1m;
lua_shared_dict my_limit_conn_store 100m; #100M可以放1.6M个键值对
include mime.types; #如果需要代理前端(静态资源)需要加这一行
client_header_buffer_size 64k;
large_client_header_buffers 4 64k;
init_by_lua_file lua/init_by_lua.lua; # nginx启动时就会执行
include ./conf.d/*.conf; # lua生成upstream
resolver 10.10.10.12;
}