Nginx default.conf problem
迷茫
迷茫 2017-05-16 17:18:20
0
1
1030

After using Docker and starting the nginx official image of Docker Hub, there are two configuration files in the container.
One is: /etc/nginx/conf.d/default.conf
The other one is: /etc/nginx/nginx.conf

I don’t know what the difference is between these two files.
So I downloaded the compressed package from the nginx official website to check it out (not yum installation, just downloading),
But there is only nginx.conf in the compressed package, and there is no default .conf,
So enter the container and open it to see, but there is no vi in ​​the container, so it cannot be opened.
Question:
Is there any other way to view the files in the container (other than installing vi)?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
洪涛

nginx.conf is the configuration file loaded by nginx by default

You can view the nginx default configuration file path through nginx -V.

I have never used docker nginx, but I guess default.conf may be included in nginx.conf. In other words, nginx.conf is the main configuration file, and default.conf is the file that configures a default virtual host.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!