nginx静态网页代理

安装ningx 之后,

放置静态资源:

单html文件

nginx 配置文件: /etc/nginx/conf.d/default.conf

server {
        listen 8079;
        server_name test.ubuntu.com;
        charset utf-8;
        autoindex on;
        location / {
                root  /home/hkx/web-app;
                index index.html;

        }


}

检查nginx配置:

nginx -t

nginx -s reload

访问:

http:ip:8079/index.html

或者域名:

http://host:8079/index.html

发表回复