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;

#}

}

相关推荐
顺风尿一寸1 天前
Nginx源码分析:变量系统的设计与请求生命周期中的日志记录
nginx
十二7404 天前
前端缓存踩坑实录:从版本号管理到自动化构建
前端·javascript·nginx
可观测性用观测云5 天前
云原生网关 Ingress-Nginx 链路追踪实战:OpenTelemetry 采集与观测云集成方案
nginx·kubernetes
闲云一鹤7 天前
nginx 快速入门教程 - 写给前端的你
前端·nginx·前端工程化
何中应10 天前
Nginx转发请求错误
前端·后端·nginx
芝士雪豹只抽瑞克五11 天前
Nginx 高性能Web服务器笔记
服务器·nginx
失重外太空啦11 天前
nginx
运维·nginx
天蓝不会忘记0211 天前
lvs,haproxy,keepalived,nginx,tomcat介绍和实验
nginx·tomcat·lvs
feng68_11 天前
Nginx高性能Web服务器
linux·运维·服务器·nginx