- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務(wù)經(jīng)營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會理事單位
- 安全聯(lián)盟認證網(wǎng)站身份V標記
- 域名注冊服務(wù)機構(gòu)許可:滇D3-20230001
- 代理域名注冊服務(wù)機構(gòu):新網(wǎng)數(shù)碼
關(guān)于TP3.2 nginx下配置子域名
1、nginx.conf
server {
listen 80;
server_name admin.xxx.com;
set $rootpath /data/wwwroot/;
client_max_body_size 128M;
access_log /var/log/nginx/log/www.tjdsmy.cn;
location / {
root $rootpath;
#下面這段偽靜態(tài)支持
if (!-e $request_filename){
#rewrite ^/(.*) /index.php last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
#上面這段偽靜態(tài)支持
index index.php index.html index.htm;
}
#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 /usr/share/nginx/html;
}
location ~ .php$ {
root $rootpath;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param _FILENAME $rootpath$fastcgi__name;
include fastcgi_params;
}
location ~ /.ht {
deny all;
}
}
2、TP框架入口
.htaccess文件 //默認自帶的即可
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
3、TP框架App/commcon/conf文件
'APP_SUB_DOMAIN_DEPLOY' => 0, // 開啟子域名或者IP配置
'APP_SUB_DOMAIN_RULES' => array(
'admin' => 'Admin', // 后臺訪問網(wǎng)站
),
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP