nginx可以配置域名。
server {
listen 80; # 监听 80 端口
autoindex on;
server_name activate.navicat.com; //访问域名
access_log logs/host.access.log combined; //日志文件位置
index index.html index.htm index.jsp index.php; //前端页面显示优先级
if ( $query_string ~* ".*[\;'\<\>].*" ){
return 404;
}
location / {
proxy_pass http://127.0.0.1:8080; # 反向代理到 8080 端口
add_header Access-Control-Allow-Origin *;
}
}
顶一下

(0)
0%
踩一下

(0)
0%
- 相关评论
- 我要评论
-