国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Specify prefix when nginx starts
天蓬老師
天蓬老師 2017-05-16 17:25:25
0
3
761

My nginx is compiled, and the prefix(/etc/nginx) is specified when configure. But when I deploy nginx, the directory is not the prefix configured when configure, so an error will be reported:

正在啟動(dòng) nginx:nginx: [alert] could not open error log file: open() "/etc/nginx/logs/error.log" failed (2: No such file or directory)
2014/10/28 17:56:16 [emerg] 5529#0: mkdir() "/etc/nginx/cache/client_temp" failed (2: No such file or directory)

I want to let it automatically go to a new directory without recompiling. The new directory is /etc/nginx2. Is it possible to specify prefix at startup. My compilation parameters are roughly:

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
天蓬老師
天蓬老師

歡迎選擇我的課程,讓我們一起見(jiàn)證您的進(jìn)步~~

reply all(3)
phpcn_u1582

1. From the error message, it is guessed that /etc/nginx does not exist. It is recommended to check the access_log and error_log configuration items;
2. Whoever compiles is responsible for execution. Don’t compile on machine A and execute on machine B;
3. /etc is generally not used to store programs, you can use /opt.

給我你的懷抱

nginx execution can use the path of other content specified in -c指定配置文件,拿你的配置來(lái)說(shuō),比如醬紫/etc/nginx/sbin/nginx -c /link/nginx.confnginx.conf.


/etcThe directory generally stores software configuration files

左手右手慢動(dòng)作

Edit the startup file under init.d and specify the startup working environment of nginx

/usr/sbin/nginx -p $BASE_DIR/usr/local/nginx_newdir

Or specify the configuration file

/usr/sbin/nginx -c $BASE_DIR/etc/nginx/nginx.conf 

Of course, you can use both parameters together.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template