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;

#}

}

相关推荐
Wang's Blog3 小时前
Java 项目实战: 外卖平台优化-Nginx配置文件结构与块层级
java·开发语言·nginx
Lsetea6 小时前
Nginx加载证书时报SSL_CTX_use_PrivateKey_file失败:私钥配对与权限排查
nginx·https·ssl证书·私钥·证书部署
吴声子夜歌9 小时前
Nginx应用与运维——Nginx负载均衡应用实战(二)
运维·nginx·负载均衡
Wang's Blog13 小时前
Java 项目实战: 外卖平台优化-Nginx六种负载均衡策略对比与选型
java·nginx·负载均衡
吴声子夜歌14 小时前
Nginx应用与运维——Nginx监控配置及管理(二)
运维·nginx
吴声子夜歌14 小时前
Nginx应用与运维——Nginx日志管理
java·运维·nginx
Wang's Blog17 小时前
Java 项目实战: 外卖平台优化-前端dist部署与Nginx反向代理rewrite
java·前端·nginx
life码农1 天前
Nginx 配置允许指定 IP 段访问:从 192.168.1.1 到 192.168.1.124 及 /24 详解
网络·tcp/ip·nginx
吴声子夜歌1 天前
Nginx应用与运维——Nginx编译及部署(部署)
java·运维·nginx
Wang's Blog2 天前
Java 项目实战: 外卖平台优化-Nginx目录结构与conf配置文件体系
java·nginx