
nginx
飞_持续更新在cnblogs
这个作者很懒,什么都没留下…
展开
-
linux安装目录和nginx.conf文件配置目录
1、查看nginx安装目录ps -aux | grep nginx 【返回结果包含安装目录】root 9764 0.0 0.1 124764 1400 ? Ss Feb25 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;www-data原创 2018-02-26 16:58:04 · 647 阅读 · 0 评论 -
nginx 重启
1、重启之前检测配置是否正确/usr/sbin/nginx -t2、重启 /usr/sbin/nginx -s reload【这种方式可能会遇到 nginx: [error] invalid PID number "" in "/run/nginx.pid" 这样的错误】nginx -c /目录位置/nginx/conf/nginx.confnginx -s reload3、centos ngin...原创 2018-02-26 17:32:17 · 232 阅读 · 0 评论 -
nginx 配置
1、显示目录autoindex on; #开启nginx目录浏览功能autoindex_exact_size off; #文件大小从KB开始显示autoindex_localtime on; #显示文件修改时间为服务器本地时间2、显示乱码 default_type 'text/html'; #charset utf-8; charset gb23...原创 2018-01-26 16:12:39 · 215 阅读 · 0 评论 -
nginx: 400 Bad Request | The plain HTTP request was sent to HTTPS port
nginx版本1.0.4 nginx一般情况下配置;server { listen 443; server_name localhost; ssl on; root html; index index.html index.htm; ssl_certificate cert/214525134250577.pem; ssl_certifi...原创 2018-03-01 14:19:13 · 17211 阅读 · 2 评论 -
ubuntu15 安装nginx 报错:the HTTP rewrite module requires the PCRE library.
./configure: error: the HTTP rewrite module requires the PCRE library.You can either disable the module by using --without-http_rewrite_moduleoption, or install the PCRE library into the system, or ...原创 2018-03-13 16:20:38 · 1405 阅读 · 0 评论 -
nginx 设置 404 500 页面跳转到指定页面
默认情况下 nginx 是不支持自定义 500 、400 页面;修改配置文件 conf/nginx.conf 添加页面重定向,在 http 内添加一行;fastcgi_intercept_errors on;在 service 内添加一行指定测错误页面error_page 404 500 = /error.html; 或者error_page 404 = http://你的域名; ...原创 2018-03-23 16:14:59 · 12429 阅读 · 1 评论 -
nginx 杂文----01
1、nginx location模块location模块执行先后官网位置:nginx location原创 2018-06-07 11:56:55 · 310 阅读 · 0 评论 -
windows 中nginx奇葩报错 nginx: [emerg] unknown directive "#" in nginx/conf/nginx.conf:3
经过: 用记事本打开nginx.conf 配置文件,后来启动nginx就开始报错,报错内容如下nginx: [emerg] unknown directive "#" in nginx/conf/nginx.conf:3nginx: [emerg] unknown directive "#user" in nginx/conf/nginx.conf:1解决办法,新建nginx....原创 2019-01-20 15:22:26 · 3495 阅读 · 0 评论 -
windows PHPstudy curl file_get_contents 本地项目之间互相访问超时
场景: windows7 phpstudy2016 php7.3 nginx, 使用curl file_get_content本地项目之间互相访问一直超时或者失败场景再现demo.test.com:80文件 E:\selfweb\git_dev\test\index.php 内容如下:<?php$file = file_get_contents("http://demo.t...原创 2019-05-28 12:06:09 · 520 阅读 · 0 评论