1 ./configure --without-http_rewrite_module
2. 修改objs/ngx_auto_config.h
#ifndef NGX_PID_PATH
#define NGX_PID_PATH "/var/logs/nginx/nginx.pid"
#endif
#ifndef NGX_LOCK_PATH
#define NGX_LOCK_PATH "/var/logs/nginx/nginx.lock"
#endif
#ifndef NGX_ERROR_LOG_PATH
#define NGX_ERROR_LOG_PATH "/var/logs/nginx/error.log"
#endif
#ifndef NGX_HTTP_LOG_PATH
#define NGX_HTTP_LOG_PATH "/var/logs/nginx/access.log"
#endif
#ifndef NGX_HTTP_CLIENT_TEMP_PATH
#define NGX_HTTP_CLIENT_TEMP_PATH "/var/logs/nginx/client_body_temp"
#endif
#ifndef NGX_HTTP_PROXY_TEMP_PATH
#define NGX_HTTP_PROXY_TEMP_PATH "/var/logs/nginx/proxy_temp"
#endif
#ifndef NGX_HTTP_FASTCGI_TEMP_PATH
#define NGX_HTTP_FASTCGI_TEMP_PATH "/var/logs/nginx/fastcgi_temp"
#endif
#ifndef NGX_HTTP_UWSGI_TEMP_PATH
#define NGX_HTTP_UWSGI_TEMP_PATH "/var/logs/nginx/uwsgi_temp"
#endif
#ifndef NGX_HTTP_SCGI_TEMP_PATH
#define NGX_HTTP_SCGI_TEMP_PATH "/var/logs/nginx/scgi_temp"
#endif
3. make && sudo make install
4. sudo mkdir /var/logs/nginx
sudo chmod 777 /var/logs/nginx
5. sudo ln -s /usr/local/nginx/sbin/nginx /usr/local/bin/nginx
6. nginx