php 怎么做域名解析
答案:1 悬赏:60 手机版
解决时间 2021-04-06 01:50
- 提问者网友:謫仙
- 2021-04-05 01:52
php 怎么做域名解析
最佳答案
- 五星知识达人网友:廢物販賣機
- 2021-04-05 03:31
php只是用来做解读程序的
需要通过入 nginx、apache、apache来解析域名到指定文件夹
server {
listen 80;
server_name 域名;
root "目录";
location / {
index index.html index.htm index.php;
#autoindex on;
try_files $uri /index.php$uri;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
location ~ .php(.*)$ {
fastcgi_pass 127.0.0.1:9000; #php端口默认9000
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;
}
}
需要通过入 nginx、apache、apache来解析域名到指定文件夹
server {
listen 80;
server_name 域名;
root "目录";
location / {
index index.html index.htm index.php;
#autoindex on;
try_files $uri /index.php$uri;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
location ~ .php(.*)$ {
fastcgi_pass 127.0.0.1:9000; #php端口默认9000
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;
}
}
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯