banner
NEWS LETTER

测试一篇新文章

Scroll down

好久没有登录的阿里云服务器,这几天捡起来准备部署个博客搞搞事情,结果发现,之前安装的Nginx,忘记了端口和请求路径映射的配置文件放在哪了,这可咋整。

先找到运行中的Nginx

执行命令:

ps -ef | grep nginx
1
看到我们服务器上运行中的Nginx,如下:

root 1425 1 0 1月11 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf

nginx 1426 1425 0 1月11 ? 00:00:00 nginx: worker process

nginx 1427 1425 0 1月11 ? 00:00:01 nginx: worker process

root 457316 456678 0 20:45 pts/0 00:00:00 grep –color=auto –exclude-dir=.bzr –exclude-dir=CVS –exclude-dir=.git –exclude-dir=.hg –exclude-dir=.svn –exclude-dir=.idea –exclude-dir=.tox nginx
1
2
3
4
5
6
7
找到了nginx.conf配置文件。

打开nginx.conf

按照根据路径/etc/nginx/nginx.conf,查看nginx.conf文件。

看啊,http这部分的配置

这里写明了配置是include这个路径下的所有conf后缀的文件。

进入路径/etc/nginx/conf.d

我们进入到/etc/nginx/conf.d路径,看到路径下有个default.conf配置文件,这就是我们要找的配置文件啦

其他文章
请输入关键词进行搜索