用户工具

站点工具


utils:nginx

1.命令

#启动
systemctl start nginx.service
#关闭
systemctl stop nginx.service
#重启
systemctl restart nginx.service
#开机启动
systemctl enable nginx.service

2.配置

http {
    ...
    server {
        listen       80;
        server_name  localhost;
	add_header   Access-Control-Allow-Origin   '*'; 
 
        location / {
            root   html;
            index  index.html index.htm;
        }
 
	location /ts {
            alias   E:\\tspj;
            index  index.html index.htm;
        }
 
        ...
    }
    ...
 
 
 
}
utils/nginx.txt · 最后更改: 2018/07/04 09:34 (外部编辑)