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;

#}

}

相关推荐
WGS.6 小时前
Ubuntu 更改 Nginx 版本
nginx
莱茵不哈哈6 小时前
OpenResty 深度解析:构建高性能 Web 服务的终极方案
nginx·lua·kong·openresty·conf
SHUIPING_YANG9 小时前
Nginx 返回 504 状态码表示 网关超时(Gateway Timeout)原因排查
运维·nginx·gateway
〆、风神12 小时前
面试真题 - 高并发场景下Nginx如何优化
java·nginx·面试
noravinsc1 天前
国产化中间件 替换 nginx
运维·nginx·中间件
ZHOU_WUYI1 天前
使用 Docker 部署 React + Nginx 应用教程
nginx·react.js·docker
梦在深巷、1 天前
nginx配置之负载均衡
运维·nginx·负载均衡
iRayCheung1 天前
Kind方式部署k8s单节点集群并创建nginx服务对外访问
nginx·kubernetes·kind
影龙帝皖2 天前
Linux服务之lvs+keepalived nginx+keepalived负载均衡实例解析
linux·nginx·lvs
nangonghen2 天前
Nginx stream模块是连接级别的负载均衡
nginx·负载均衡