![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nginx
jgywoshiyy
这个作者很懒,什么都没留下…
展开
-
nginx 映射静态资源
server { listen 8080; server_name localhost; include conf.d/confs/*.conf; location /data_display/data { autoindex_localtime on; # 可以显示localtime root /data/test autoindex on; 要显示静态资源这个一定要开启 } ... } ...原创 2022-04-18 11:09:39 · 2168 阅读 · 0 评论 -
Linux top命令
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 20 0 20016 3928 3328 S 0.0 0.0 0:00.31 bash 25 root 20 0 80780 15592 11376 S 0.0 0.0 0:07.82 uwsgi 344 root 20 0 1710444 401908 12792...原创 2021-12-17 17:43:51 · 610 阅读 · 0 评论 -
lua_shared_dict 和resty.lock的使用
nginx.conf 配置: lua_shared_dict test 100k; 代码样例 local lock, err = resty_lock:new("test") --create_lock if not lock then return log_error("failed to create lock: ", err) end local elapsed, err = lock:lock('my_lock_handler') --acquire_lock if not ela...原创 2021-11-09 19:31:36 · 2096 阅读 · 1 评论 -
nginx proxy_pass 后面带不带/
nginx proxy_pass后的url加不加/的区别 在nginx中配置proxy_pass时,当在后面的url加上了/,相当于是绝对根路径,则nginx不会把location中匹配的路径部分代理走;如果没有/,则会把匹配的路径部分也给代理走。 下面四种情况分别用http://192.168.1.4/proxy/test.html 进行访问。 第一种: location /proxy/ { proxy_pass http://127.0.0.1:81/; } ...原创 2021-11-09 18:36:34 · 484 阅读 · 0 评论