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;

#}

}

相关推荐
timeweaver8 分钟前
深度解析 Nginx 前端 location 配置与优先级:你真的用对了吗?
前端·nginx·前端工程化
Moment5 小时前
nginx 如何配置防止慢速攻击 🤔🤔🤔
前端·后端·nginx
伊成20 小时前
Docker 部署 Nginx 完整指南
nginx·docker·容器
小白的代码日记1 天前
Nginx学习与安装
运维·nginx
ayaya_mana1 天前
Nginx性能优化与安全配置:打造高性能Web服务器
运维·nginx·安全·性能优化
油丶酸萝卜别吃2 天前
nginx配置代理服务器
运维·网络·nginx
花酒锄作田2 天前
Nginx反向代理Kafka集群
nginx·kafka
奥格列的魔法拖鞋~2 天前
Docker-LNMP架构 创建多项目- 单个ngixn代理多个PHP容器服务
nginx·docker·eureka·架构·php·lnmp
皓空揽月2 天前
php+apache+nginx 更换域名
nginx·php·apache
会说法语的猪2 天前
使用nginx反向代理kkfile
运维·nginx