1.安装
./configure make make install(要支持正则表达式的话要依赖安装pcre库)
默认安装的路径是/usr/local/nginx
更多的安装配置
./configure --prefix=/usr/local/nginx --with-openssl=/usr/include (启用ssl) --with-pcre=/usr/include/pcre/ (启用正规表达式) --with-http_stub_status_module (安装可以查看nginx状态的程序) --with-http_memcached_module (启用memcache缓存) --with-http_rewrite_module (启用支持url重写)2. 启动及重启 启动:nginx 重启:kill -HUP `cat /usr/local/nginx/logs/nginx.pid` 测试配置文件:nginx -t