这篇文章是在linux服务器可以访问网络的情况下安装nginx,以及反向代理的配置
首先安装准备环境
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
安装pcre
pcre解压编译
tar -zxvf pcre-8.35.tar.gz
mv pcre-8.35 /usr/local/src/
./configure
make && make install
安装nginx
nginx解压编译
tar -zxvf nginx-1.6.2.tar.gz
mv nginx-1.6.1 /usr/local/src/
./configure --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.35
make
make install
nginx反向代理简单配置
vi /usr/local/webserver/conf/nginx.conf

nginx
nginx -s reload
nginx -s stop
相关文章: