location / { root D:/rx/dev/trunk/client/game/bin/;

server {

listen 80;

server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {

root D:/rx/dev/trunk/client/game/bin/;

root ../../client;

index index.html index.htm;

autoindex on;

#autoindex_format json;

#autoindex_localtime on;

add_header Access-Control-Allow-Origin *;

}

#error_page 404 /404.html;

redirect server error pages to the static page /50x.html

error_page 500 502 503 504 /50x.html;

location = /50x.html {

root ..;

}

proxy the PHP scripts to Apache listening on 127.0.0.1:80

#location ~ \.php$ {

proxy_pass http://127.0.0.1;

#}

pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

#location ~ \.php$ {

root ..;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;

include fastcgi_params;

#}

deny access to .htaccess files, if Apache's document root

concurs with nginx's one

#location ~ /\.ht {

deny all;

#}

}

相关推荐
core5124 小时前
prometheus+grafana接入nginx实战
nginx·grafana·prometheus·监控·接入·vts·vtx
xian_wwq1 天前
【学习笔记】Nginx常用安全配置
笔记·学习·nginx
不知疲倦的仄仄1 天前
2025Nginx最新版讲解/面试
nginx·代理模式·proxy模式
不要图透2 天前
初用nginx
nginx
启明真纳2 天前
[特殊字符]使用 Nginx 将 HTTP 重定向到 HTTPS
nginx·http·https
潘晓可3 天前
Docker部署Nginx代理多个服务:公网域名与内网IP场景全解
nginx·docker·nginx proxy
✧北辰٩(ˊωˋ*)و南冥✧3 天前
nginx 负载均衡配置(加解决重复登录问题)
运维·nginx·负载均衡
hnlucky3 天前
《Nginx + 双Tomcat实战:域名解析、静态服务与反向代理、负载均衡全指南》
java·linux·服务器·前端·nginx·tomcat·web
步、步、为营3 天前
.net服务器Kestrel配置Nginx作为反向代理
服务器·nginx·.net
晨岳4 天前
CentOS 安装 JDK+ NGINX+ Tomcat + Redis + MySQL搭建项目环境
java·redis·mysql·nginx·centos·tomcat