nginx安装配置

来源:互联网 发布:吉林省卫生网络直报 编辑:程序博客网 时间:2024/06/11 01:02
nginx配置
安装http://nginx.org/en/linux_packages.html#distributions
安装stable version for ubuntu
启动nginx: sudo nginx
nginx.conf在/etc/nginx
配置静态资源
注释掉 
#include /etc/nginx/conf.d/*.conf;
加上
    server {
        listen       880;
        server_name  localhost;
        location / { 
            proxy_pass http://localhost:8888;
        }
    }   
    server {
        listen       990; 
        server_name  localhost;
        location / { 
            proxy_pass http://localhost:9999;
        }
    }  
重新加载配置文件
sudo nginx -s reload
0 0