
nginx
文章平均质量分 56
nginx
crayon-shin-chan
这个作者很懒,什么都没留下…
展开
-
nginx 配置SPA应用路由前缀
try_files 的最后一个回退项目也必须有前缀,这样才能再次匹配这个 block。用 alias 改变当前目录。路由匹配要使用 ^~原创 2023-04-13 16:24:42 · 631 阅读 · 0 评论 -
ubuntu上使用certbot安装ssl证书到nginx
文档:Certbot Instructions | Certbot1.简介Certbot 是一种免费的开源软件工具用于在手动管理的网站上自动使用Let's Encrypt证书以启用 HTTPS。Certbot 每 60 天更新一次证书。这里选择普通的安装,而不是通配符模式。2.安装snapcertbot作为snap分发包安装,很多linux发行版内置了snap,如ubuntusudo snap install core; sudo snap refresh原创 2021-12-09 22:01:25 · 2387 阅读 · 0 评论 -
nginx入门之命令行使用
文档:Command-line parameters1.简介nginx命令行介绍$ nginx -hnginx version: nginx/1.20.1Usage: nginx [-?hvVtTq] [-s signal] [-p prefix] [-e filename] [-c filename] [-g directives]Options: -?,-h : this help -v : show原创 2021-11-06 21:43:31 · 1678 阅读 · 0 评论 -
ubuntu下安装nginx
文档:nginx: Linux packages1.安装依赖sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring2.导入apt密钥导入官方 nginx 签名密钥,以便 apt 可以验证包的真实性。获取密钥:$ curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/k原创 2021-11-06 11:39:03 · 599 阅读 · 0 评论 -
nginx for windows入门
文档:nginx for Windows1.简介适用于 Windows 的 nginx 版本使用本机 Win32 API(不是 Cygwin 仿真层)。当前仅使用select()和poll()(1.15.9)连接处理方法,因此不应期望高性能和可扩展性。由于这一点和其他一些已知问题,适用于 Windows 的 nginx 版本被认为是测试版。此时,除了 XSLT 过滤器、图像过滤器、GeoIP 模块和嵌入式 Perl 语言之外,提供与 UNIX 版本的 nginx 几乎相同的功能。原创 2021-11-06 11:24:26 · 1149 阅读 · 0 评论 -
记一个nginx错误directory index of “/var/www/xxxx/“ is forbidden,
1.简介配置nginx访问wordpress,root为wordpress根目录访问首页报错directory index of "/var/www/wordpress/" is forbidden,2.解决nginx本身有index指令,而默认的index里是不包含index.php的index index.html index.htm index.nginx-debian.html;但是wordpress的入口是index.php所以直接不加任何p..原创 2021-10-12 11:41:17 · 17854 阅读 · 1 评论 -
nginx之location指令匹配规则
doc:https://nginx.org/en/docs/http/ngx_http_core_module.html#location1.简介localtion是用于和请求url进行匹配的指令,语法如下句法: location [ = | ~ | ~* | ^~ ] uri { ... }location @name { ... }默认: —内容: server, location可以在匹配的uri模式前面添加四种修饰符,来指定匹配模式 还可以使用@指定一个命名lo..原创 2021-01-03 21:21:58 · 230 阅读 · 0 评论 -
win10系统使用vs2019/msys/cl编译nginx源码
1.简介nginx编译需要以下源码或者库文件:nginx:https://github.com/nginx/nginx pcre:https://ftp.pcre.org/pub/pcre/, 只支持4.4-8.43版本 zlib:https://zlib.net/ openssl:https://github.com/openssl/openssl2.编译./auto/configure --prefix=. --sbin-path=nginx.exe --...原创 2021-01-03 15:40:38 · 399 阅读 · 0 评论 -
ubuntu20.04.2上安装nginx+php+fpm
1.更新安装源sudo apt-get update 2.安装nginxsudo apt install nginx$ service nginx status● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor prese......原创 2020-11-23 19:40:36 · 2614 阅读 · 24 评论 -
记一个nginx访问文件返回403问题
文件访问无权限,配置文件修改为user root;原来的配置文件为:user nginx;原创 2020-08-02 17:00:49 · 484 阅读 · 0 评论 -
nginx配置https证书
server { listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; server_name _; ssl_certificate "/root/cert/4233741_qumo.online_nginx/4233741_qumo.online.pem"; ssl_certificate_k..原创 2020-07-20 14:08:38 · 349 阅读 · 0 评论 -
nginx常用配置
1.端口重定向对外暴露80端口,内部监听8080端口,80重定向到8080location / { proxy_pass http://127.0.0.1:8080/;}这里http://127.0.0.1:8080后面有没有/都可以成功2.路径重定向location /project { proxy_pass http://127.0.0.1:8080/example;}端口重定向附带路径重定向,这里匹配的路径会被替换,/project后面的部分会拼接到/exa.原创 2020-07-16 14:15:09 · 137 阅读 · 0 评论 -
nginx的安装
nginx主要实在linux上使用,而linux上安装需要编译源码安装,这里主要记录一下命令安装之前需要安装一些功能库,gzip等等,需要的话可以搜索自己的linux版本如何安装生成makefile:./configure --prefix=/usr/local/dev/nginx-1.15.2 --with-poll_module --with-select_module --wi...原创 2018-08-21 18:30:58 · 157 阅读 · 0 评论