## admin_conf
- 域名(ServerName) : platform.02ai6i.com
- 專案 : 配置後台, india/website/frontend/admin
- root : /data/www/admin
- Location :
- platform.02ai6i.com/api -> http://172.24.180.97:3120/, http://172.24.180.97:3128/
- platform.02ai6i.com/ws -> http://172.24.180.97:3120/ws
---
## agent.conf
- 域名(ServerName) : agent.02ai6i.com
- 專案 : 俱樂部後台, 找不到相關專案
- root : /data/www/agent
- Location :
- agent.02ai6i.com/api -> http://172.24.180.97:3120/
## api_down_conf
- 域名(ServerName) : apidown.02ai6i.com
- 專案 :
- Location :
- apidown.02ai6i.com -> /data/upgrade_api/
## clientapi.conf
- 域名(ServerName) : clientapi.02ai6i.com,
sms.02ai6i.com
- root : /data/www/clientapi/
- 專案 : clientAPI
- Location :
```
location ~ \.php(.*)$ {
fastcgi_pass php-fpm;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
#include fastcgi_params;
include fastcgi.conf;
}
```
```
location / {
if ( -f $request_filename) {
break;
}
if ( !-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
```
## clientapi2.conf
- 域名(ServerName) : clientapi2.02ai6i.com,
sms2.02ai6i.com
- root : /data/www/clientapi/
- listen : 80, 3200
- 專案 : clientAPI
- Location :
```
location ~ \.php(.*)$ {
fastcgi_pass php-fpm;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
#include fastcgi_params;
include fastcgi.conf;
}
```
```
location / {
if ( -f $request_filename) {
break;
}
if ( !-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
```
## cs.conf
- 域名(ServerName) : cs.02ai6i.com
- root : /data/www/cs/public
- 專案 : 客服後台, spread_channel_top
- Location :
```
location ^~ /vue/ {
root /data/www/cs_vue/;
}
location ^~ /assets/ {
root /data/www/cs_vue/vue/;
}
include rewrite/laravel.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
include enable-php-pathinfo.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
```
## customer_service.conf
- 域名(ServerName) : cs2.02ai6i.com
- root : /data/www/customer_service/client/
- 專案 : 客服後台, spread_channel_top
- Location :
```
location /api {
root /data/www/customer_service/server/;
index index.php;
# include enable-php-pathinfo.conf;
fastcgi_pass php-fpm;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
# try_files $fastcgi_script_name =404;
try_files $uri $uri/ /public/index.php?$query_string;
}
```
## debugreport.conf
- 域名(ServerName) : debugreport.02ai6i.com
- 專案 : 錯誤報告
- Location : debugreport.02ai6i.com -> http://172.24.180.97:3120/debugReport
## down.conf
- 域名(ServerName) : down.02ai6i.com
- 專案 :
- root : /home/hotfix/update
## down_carnaval.conf
- 域名(ServerName) : down_carnaval.02ai6i.com
- 專案 :
- root : /data/package_carnaval/
## down2.conf
- 域名(ServerName) : down2.02ai6i.com
- 專案 :
- root : /data/package/
## down3.conf
- 域名(ServerName) : bjdown.easygameapi.com
- 專案 :
- root : /data/package2/
## h5.conf
- 域名(ServerName) : h5.02ai6i.com
- 專案 :
- Location : h5.02ai6i.com -> http://127.0.0.1:3000
## hxapi_callback.conf
- 域名(ServerName) : apicbk.02ai6i.com
- 專案 :
- Location : apicbk.02ai6i.com -> http://172.24.180.97:3201
## main.conf
- 域名(ServerName) : www.02ai6i.com, 02ai6i.com
- 專案 : spread_main
- root : /data/www/main/
- Location :
```
location / {
index index.html;
}
# 推广地址
location ~ /(\w+\.shtml)$ {
proxy_pass http://172.24.180.97:3120/spread/$1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host www.02ai6i.com;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# 更新点击
location ~ /update/(\.*) {
proxy_pass http://172.24.180.97:3120/spread/update/$1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host www.02ai6i.com;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
```
## main_carnaval.conf
- 域名(ServerName) : carnaval.02ai6i.com
- 專案 : spread_main
- root : /data/www/main_carnaval/
- Location :
```
location / {
index index.html;
}
# 推广地址
location ~ /(\w+\.shtml)$ {
proxy_pass http://172.24.180.97:3120/spread/$1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host carnaval.02ai6i.com;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# 更新点击
location ~ /update/(\.*) {
proxy_pass http://172.24.180.97:3120/spread/update/$1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host carnaval.02ai6i.com;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
```
## manager.conf
- 域名(ServerName) : manager.02ai6i.com
- 專案 : 管理服務,
看起來跟LobbyService有關, 但找不到相關的前端程式碼
- root : /data/www/manager/
- Location :
```
location / {
root /data/www/manager/;
index index.html;
}
location /api/mgr {
proxy_pass http://172.24.180.97:3120/mgr;
}
location /ws {
proxy_redirect off;
proxy_pass http://172.24.180.97:3120/ws;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
# proxy_set_header Host manager.02ai6i.com;
}
```
## mobile.conf
- 域名(ServerName) : mobile.02ai6i.com, mobile2.02ai6i.com
- 專案 :
- root : /data/www/h5
## new_channel.conf
- 域名(ServerName) : newchannel.02ai6i.com
- 專案 : 渠道登錄管理, spread_channel_top
- root : /data/www/new_channel/vue;
- Location :
newchannel.02ai6i.com/api -> http://127.0.0.1:8089/api/
## new_channel_laravel.conf
- 域名(ServerName) : newchannel.02ai6i.com
- listen : 8089
- 專案 : 渠道登錄管理, spread_channel_top
- root : /data/www/new_channel/laravel/public;
- Location :
```
include rewrite/laravel.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
include enable-php-pathinfo.conf;
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
```
## new_platform.conf
- 域名(ServerName) : newplatform.02ai6i.com
- 專案 : 運營後台, spread_channel_top
- root : /data/www/new_platform/vue;
- Location :
newplatform.02ai6i.com/api -> http://127.0.0.1:8088/api/
## new_platform_laravel.conf
- 域名(ServerName) : newplatform.02ai6i.com
- listen : 8088
- 專案 : 運營後台, spread_channel_top
- root : /data/www/new_platform/laravel/public;
- Location :
```
include rewrite/laravel.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
include enable-php-pathinfo.conf;
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
```
## oauth.conf
- 域名(ServerName) : oauth.02ai6i.com
- 說明 : 開放式授權, AdminServer
- Location :
oauth.02ai6i.com -> http://172.24.180.97:3120/oauth/
## pay.conf
- 域名(ServerName) : pay.02ai6i.com
- 說明 : 支付, adminServer
- Location :
pay.02ai6i.com -> http://172.24.180.97:3120/pay/,
pay.02ai6i.com/pay/pay_notify/ -> http://172.24.180.97:3120/pay/pay_notify/
## php-fpm.conf
nginx 與 fastcgi 的 socket 通訊
```
upstream php-fpm {
server unix:/run/php-fpm/www.sock;
# server 127.0.0.1:9000;
}
```
## platform.conf
- 域名(ServerName) : admin.02ai6i.com
- 說明 : 後台管理, website/frontend/admin
- root : /data/www/platform/vue
- Location :
admin.02ai6i.com/api/ -> http://172.24.180.97:3120/api/,
admin.02ai6i.com/ws -> http://172.24.180.97:3120/ws
## res.conf
- 域名(ServerName) : res.02ai6i.com
- 專案 : admin_server
- root : /data/www/res/
## spread.conf
- 域名(ServerName) : spread.02ai6i.com
- 說明 : 推廣員, 推廣渠道
- root : /data/www/main/, spread_main
- Location :
spread.02ai6i.com -> http://172.24.180.97:3120/spread/,
spread.02ai6i.com/(\w+\.shtml) -> http://172.24.180.97:3120/spread/$1
## spread_channel.conf
- 域名(ServerName) : spc.02ai6i.com
- 說明 : 渠道登錄管理, spread_channel_top
- root : /data/www/spread_channel/
- Location :
spc.02ai6i.com/api/chm/ -> http://172.24.180.97:3120/chm/
## spread_channel_top.conf
- 域名(ServerName) : channel-top.02ai6i.com
- 說明 :
- 專案 : spread_channel_top
- root : /data/www/spread_channel_top/public
- Location :
```
location ^~ /vue/ {
root /data/www/spread_channel_top_vue/;
}
location ^~ /assets/ {
root /data/www/spread_channel_top_vue/vue/;
}
include rewrite/laravel.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
include enable-php-pathinfo.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
access_log /data/wwwlogs/spread_channel_top.log main;
```
## spread_main.conf
- 域名(ServerName) : spread2.02ai6i.com
- 說明 :
- 專案 : spread_main
- root : /data/www/spread_main/
- Location :
spread2.02ai6i.com/update -> http://172.24.180.97:3120/spread/update
## stat.conf
- 域名(ServerName) : stat.02ai6i.com
- 說明 :
- 專案 : backend/stat
- root : /data/www/stat/public
- include :
include rewrite/laravel.conf,
include enable-php-pathinfo.conf
## third_gameapi_callback.conf
- 域名(ServerName) : pgapi_cbk.02ai6i.com, oneapicbk.02ai6i.com
- 說明 : PG 回调,转回公司公网IP,
- 專案 : backend/stat
- location :
```
server{
listen 80;
server_name pgapi_cbk.02ai6i.com;
access_log /var/log/nginx/pgapi_callback.access.log main;
error_log /var/log/nginx/pgapi_callback.error.log warn;
location /totst {
proxy_pass http://172.24.180.97:3201/pgapi/;
proxy_set_header Host apicbk.02ai6i.com;
}
location /toetg {
proxy_pass http://121.15.157.204:5250/pgapi/;
proxy_set_header Host apicbk.02ai6i.com;
}
location / {
proxy_pass http://172.24.180.97:3201/pgapi/;
proxy_set_header Host apicbk.02ai6i.com;
#proxy_pass http://121.15.157.204:5250/pgapi/;
#proxy_set_header Host apicbk.02ai6i.com;
}
}
server{
listen 80;
server_name oneapicbk.02ai6i.com;
access_log /var/log/nginx/oneapi_callback.access.log main;
error_log /var/log/nginx/oneapi_callback.error.log warn;
location /totst {
proxy_pass http://172.24.180.97:3201/oneapi/;
proxy_set_header Host oneapi_cbk.vmhost18.com;
}
location /toetg {
proxy_pass http://121.15.157.204:5250/oneapi/;
proxy_set_header Host oneapi_cbk.vmhost18.com;
}
location / {
proxy_pass http://172.24.180.97:3201/oneapi/;
proxy_set_header Host apicbk.02ai6i.com;
#proxy_pass http://121.15.157.204:5250/oneapi/;
#proxy_set_header Host operator.vmhost18.com;
}
}
```
## utils.conf
- 域名(ServerName) : utils.02ai6i.com
- 說明 : 短信
- 專案 : backend/stat
- root : /data/www/stat/public
- location :
utils.02ai6i.com/ -> http://172.24.180.97:3120/utils/
## websocket.conf
- 專案 : admin_server
```
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
include /etc/nginx/apigames.d/game_upstreams.conf;
server {
listen 80;
# 这里改动了,也可以写你的域名
server_name game.02ai6i.com;
# 日志
access_log /var/log/nginx/websocket.access_nginx.log main;
error_log /var/log/nginx/websocket.error_nginx.log debug;
# Load configuration files for the default server block.
location ~ ^/games/(\d+)/(\d+)$ {
proxy_buffering off;
proxy_pass http://game.server.$1.$2;
proxy_redirect off;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
#proxy_set_header Host $host;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
}
}
```
## clientapi.conf
- 域名(ServerName) : clientapi.02ai6i.com, sms.02ai6i.com
- 說明 : clientapi
- listen : 3200
- root : /data/www/clientapi/
- location :
```
location / {
if ( -f $request_filename) {
break;
}
if ( !-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
location ~ \.php(.*)$ {
# fastcgi_pass unix:/tmp/systemd-private-08e23ef2fbca48588509c109f9a0e2e8-php-fpm.service-WcsyQg/tmp/php-fpm74.sock;
fastcgi_pass unix:/var/run/php-fpm74.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
#include fastcgi_params;
include fastcgi.conf;
}
```
## fcgi.conf
```
upstream backend {
server unix:/var/sockets/fcgi.sock;
}
upstream websocket {
server unix:/var/sockets/websocket1.sock;
}
server{
listen 3120;
server_name _;
location / {
fastcgi_pass backend;
fastcgi_keep_conn on;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers *;
add_header Access-COntrol-Allow-Methods *;
return 204;
}
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers *;
add_header Access-Control-Allow-Methods *;
# add_header Access-Control-Allow-Credentials true;
fastcgi_param HOST $http_host;
fastcgi_param SERVER_NAME $http_host;
fastcgi_param LOCAL_URI $request_uri;
fastcgi_param REMOTE_ADDR $http_x_real_ip;
fastcgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
include fastcgi_params;
}
location /ws {
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Max-Age 86400;
return 204;
}
add_header Access-Control-Allow-Origin *;
proxy_pass http://websocket;
proxy_http_version 1.1;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection Upgrade;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
```
## hxapi.conf
```
server {
listen 3201;
server_name _ apicbk.02ai6i.com;
access_log /var/log/nginx/hxapi_callback.access.log main;
error_log /var/log/nginx/hxapi_callback.error.log warn;
#fastcgi_socket_keepalive on;
fastcgi_keep_conn on;
keepalive_requests 4096;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 8 64k;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ ^/egapi/(\S+)$ {
fastcgi_pass unix:/run/hxfcgi_operator.sock;
fastcgi_keep_conn on;
set $api_name $1;
#return 200 "apiname:$1";
fastcgi_param HTTP_API_NAME $api_name;
set $realip $remote_addr;
if ($http_x_forwarded_for ~ "^(\d+\.\d+\.\d+\.\d+)") {
set $realip $1;
}
fastcgi_param HTTP_REMOTE_ADDR $realip;
include fastcgi_params;
}
location ~ ^/egv2api/(\S+)$ {
fastcgi_pass unix:/run/hxfcgi_operator.sock;
fastcgi_keep_conn on;
set $api_name $1;
#return 200 "apiname:$1";
fastcgi_param HTTP_API_NAME $api_name;
set $realip $remote_addr;
if ($http_x_forwarded_for ~ "^(\d+\.\d+\.\d+\.\d+)") {
set $realip $1;
}
fastcgi_param HTTP_REMOTE_ADDR $realip;
include fastcgi_params;
}
location ~ ^/pgapi/(\S+)$ {
fastcgi_pass unix:/run/hxfcgi_operator.sock;
fastcgi_keep_conn on;
set $api_name $1;
#return 200 "apiname:$1";
fastcgi_param HTTP_API_NAME $api_name;
set $realip $remote_addr;
if ($http_x_forwarded_for ~ "^(\d+\.\d+\.\d+\.\d+)") {
set $realip $1;
}
fastcgi_param HTTP_REMOTE_ADDR $realip;
include fastcgi_params;
}
location ~ ^/oneapi/(\S+)$ {
fastcgi_pass unix:/run/hxfcgi_operator.sock;
fastcgi_keep_conn on;
set $api_name $1;
#return 200 "apiname:$1";
fastcgi_param HTTP_API_NAME $api_name;
set $realip $remote_addr;
if ($http_x_forwarded_for ~ "^(\d+\.\d+\.\d+\.\d+)") {
set $realip $1;
}
fastcgi_param HTTP_REMOTE_ADDR $realip;
include fastcgi_params;
}
}
```
## pay.conf
```
server{
listen 3131;
location / {
proxy_pass https://asdqw3ds8e3wj80opd-order.xnslxxl.com/;
proxy_ssl_server_name on;
# proxy_pass http://127.0.0.1:3120/33333/;
# proxy_set_header X-Real-IP $remote_addr;
}
}
```