安装nginx

下载
tar
./configure

安装Nginx时报错

./configure: error: the HTTP rewrite module requires the PCRE library.

安装pcre-devel解决问题
yum -y install pcre-devel


make && make install

默认安装到
/usr/local/nginx 

启动

/usr/local/nginx/sbin/nginx 

关闭nginx
pkill -9 nginx

跳转
server {
    listen 80;
    server_name localhost;
    location / {
        proxy_pass http://192.168.1.100:8080;
    }
}

你可能感兴趣的:(nginx)