我的nginx是编译好的,在configure的时候指定的prefix(/etc/nginx)。但是我部署nginx的时候的目录不是configure时配置的prefix,于是会报错:正在启动nginx:nginx:[alert]couldnotopenerrorlogfile:open()"/etc/nginx/logs/error.log"failed(2:Nosuchfileordirectory)2014/10/2817:56:16[emerg]5529#0:mkdir()"/etc/nginx/cache/client_temp"failed(2:Nosuchfileordirectory)我想在不重新编译的情况下,让它自动去新的目录下面,新的目录是/etc/nginx2。有没有可能在启动时指定prefix。我的编译参数大致是:auto/configure--prefix="/etc/nginx"--with-debug--user=nginx--group=nginx--error-log-path="logs/error.log"--http-log-path="logs/access.log"--with-http_realip_module--with-http_addition_module--with-http_sub_module--with-http_dav_module--with-http_flv_module--with-http_mp4_module--with-http_random_index_module--with-http_secure_link_module--with-http_stub_status_module--http-client-body-temp-path=cache/client_temp--http-proxy-temp-path=cache/proxy_temp--http-fastcgi-temp-path=cache/fastcgi_temp--http-scgi-temp-path=cache/scgi_temp--http-uwsgi-temp-path=cache/uwsgi_temp--with-pcre=linux/pcre-8.35--with-zlib=linux/zlib-1.2.8
添加回答
举报
0/150
提交
取消
