nginx
nginx知识点
cmmboy1990
积累、
展开
-
Windows 结束nginx 所有进程
命令行cmd:taskkill /f /t /im nginx.exe原创 2022-01-28 13:13:06 · 4185 阅读 · 0 评论 -
vue项目nginx反向代理配置
1.nginx配置文件设置#开始配置我们的反向代理location /prod-api{rewrite ^/prod-api/(.*)$ /$1 break;include uwsgi_params;proxy_set_header Host $host;proxy_set_header x-forwarded-for $remote_addr;proxy_set_header X-Real-IP $remote_addr;proxy_pa原创 2021-11-26 10:26:30 · 6717 阅读 · 0 评论 -
vuecli项目打包放在nginx服务中
1.前提如果web项目部署在 根目录下 即 /,需要同时启动两个项目即 web项目和h5项目2。配置文件设置location / { root D:/nginx2/dist/; index index.html index.htm; try_files $uri $uri/ /index.html; autoindex on; #开启nginx目录浏览功能 autoindex_exact_size off; #文件大小从KB开始原创 2021-11-26 10:01:24 · 1869 阅读 · 0 评论 -
nginx 配置静态资源访问
1.在文件夹中新建upload文件夹2.在配置文件nginx.conf中配置路径#H5 配置静态资源 location /h5/upload { alias D:/h5/upload/; autoindex on; }3.测试图片访问地址http://localhost/h5/upload/cs.png原创 2021-11-26 09:57:48 · 2562 阅读 · 0 评论 -
windows系统nginx的安装及使用
1.下载nginxhttp://nginx.org/en/download.html下载后解压,解压后如下2.启动nginxa.直接双击nginx.exeb.打开cmd命令窗口,切换到nginx解压目录下,输入命令 nginx.exe 或者 start nginx ,回车即可3.检查nginx是否启动成功直接在浏览器地址栏输入网址 http://localhost:80,回车,出现以下页面说明启动成功4.nginx配置文件是conf目录下的nginx.conf。默认配置的nginx监听的原创 2021-11-26 09:27:52 · 448 阅读 · 0 评论