我试图在一个非常精简的linux上运行nginx,当我尝试运行它时,我得到了
[emerg] 4905#0: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
和
[alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
现在,我的问题是/etc位于只读文件系统上,所以我无法创建该目录,也不能将其符号链接到它。所有东西都安装在/opt/etc/...中,nginx -c /opt/mnt/nginx/nginx.conf也不起作用。
我怎样才能让nginx跑?
发布于 2017-08-23 17:45:58
由于/etc是只读的,所以可以使用类似于aufs的东西覆盖另一个目录以进行更改,从而有效地在/etc上为您提供rw。
mkdir /myconfig /mnt/etc
mount -t aufs br=/myconfig:/etc /mnt/etc
mount -o bind /mnt/etc /etchttps://unix.stackexchange.com/questions/340149
复制相似问题