![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nginx的使用
梁雨季™
(「・ω・)「困于心,衡于虑,征于色,发于声!ԅ(¯ㅂ¯ԅ)
展开
-
nginx的相关命令
开启nginx sudo nginx重新加载配置|重启|停止|退出 nginx -s reload|reopen|stop|quit 测试配置是否有语法错误nginx -t原创 2021-01-29 22:33:53 · 75 阅读 · 0 评论 -
nginx修改项目访问的路径
问题如何修改nginx对项目的访问路径,将其修改到自己的文件夹下放置项目?方案配置 Nginx 使其支持 :vim /usr/local/nginx/conf/nginx.conf修改默认的 location 块, root的指向的路径,修改为自己存放的路径 location ~ \.php$ { # root /usr/local/var/www; root /Users/liangyuji/Desktop/workspace/www;原创 2021-01-29 22:19:43 · 1147 阅读 · 0 评论 -
nginx: [warn] the “user“ directive makes sense only if the master process runs with super-user
nginx: [warn] the “user” directive makes sense only if the master process runs with super-user privileges, ignored in /usr/local/etc/nginx/nginx.conf:1查看版本liangyuji@liangyujideMacBook-Pro ~ % nginx -vnginx version: nginx/1.19.4启动服务liangyuji@liangyuj原创 2020-12-28 14:26:46 · 8682 阅读 · 0 评论 -
nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
liangyuji@liangyujideMacBook-Pro nginx % nginxnginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address alr原创 2020-12-28 14:07:55 · 1917 阅读 · 0 评论 -
nginx出现 [emerg] open() “/usr/local/var/run/nginx.pid” failed
nginx出现 [emerg] open() “/usr/local/var/run/nginx.pid” failedliangyuji@liangyujideMacBook-Pro nginx % nginxnginx: [emerg] open() "/usr/local/var/run/nginx.pid" failed (13: Permission denied)解决:liangyuji@liangyujideMacBook-Pro nginx % sudo nginx -c /usr原创 2020-12-28 14:00:42 · 781 阅读 · 0 评论 -
mac 安装nginx
使用brew安装nginx$ brew search nginx $ brew install nginx 输出:==> **Pouring nginx-1.19.4.catalina.bottle.tar.gz**==> **Caveats**Docroot is: /usr/local/var/wwwThe default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so thatnginx原创 2020-12-28 11:15:38 · 160 阅读 · 0 评论