
Nginx
in the way
这个作者很懒,什么都没留下…
展开
-
Nginx 配置Gzip压缩
nginx 配置gzip压缩如果有nginx转发, 两边的nginx都要配置http{gzip on;gzip_min_length 1k;gzip_buffers 4 16k;gzip_http_version 1.0;gzip_comp_level 2;gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript applicat原创 2020-12-29 11:46:56 · 369 阅读 · 0 评论 -
Nignx中配置History模式(vue)
前端在访问一个链接会调整到什么页面去。找不到路径就会调整到try_files设置的路径去 location /one { try_files $uri $uri/ /one/index.html; // one/index.html 是文件目录下的 }try_files 是指当用户请求url资源时 www.xxx.com/xxx,try_files 会到硬盘资源根目录里找 xxx(即配置中的第一个$uri)。如果存在名为 xxx 的文件就返回,如果找不到在找名为原创 2020-07-09 17:13:42 · 204 阅读 · 0 评论 -
nginx location proxy_pass 后面的url 加与不加/的区别
在nginx中配置proxy_pass时,当在后面的url加上了/,相当于是绝对根路径,则nginx不会把location中匹配的路径部分代理走;如果没有/,则会把匹配的路径部分也给代理走。 首先是location进行的是模糊匹配1)没有“/”时,location /abc/def可以匹配/abc/defghi请求,也可以匹配/abc/def/ghi等2)而有“/”时,location /a...原创 2020-03-05 19:40:17 · 283 阅读 · 0 评论 -
请求报错 405 Not Allowed
请求接口报错:optionsNot Allowed<html><head><title>405 Not Allowed</title></head><body><center><h1>405 Not Allowed</h1></center><hr&g...原创 2019-12-09 22:38:11 · 1241 阅读 · 0 评论 -
Nginx 常用操作
指定配置文件启动 ../sbin/nginx -c /usr/local/nginx/conf/nginx.conf启动Nginx:start nginx快速停止或关闭Nginx:nginx -s stop正常停止或关闭Nginx:nginx -s quit配置文件修改重装载命令:nginx -s reloadtomcat 的logs文件下 localh...原创 2019-08-23 15:52:04 · 185 阅读 · 0 评论