nginx 配置php,nginx反向代理不能配置域名?

用户投稿 26 0

关于“nginx_index.php配置”的问题,小编就整理了【1】个相关介绍“nginx_index.php配置”的解答:

nginx反向代理不能配置域名?

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 # 反向代理到 8080 端口

add_header Access-Control-Allow-Origin *;

}

}

到此,以上就是小编对于“nginx_index.php配置”的问题就介绍到这了,希望介绍关于“nginx_index.php配置”的【1】点解答对大家有用。

抱歉,评论功能暂时关闭!