nginx关于php的二级域名+子目录问题

具体环境为nginx+php,欲配置phpmyadmin。
现在的问题是访问主机域名,html目录下php可以正常运行。但是访问phpmyadmin.xxxxx.com域名,html/phpmyadmin下文件会通过浏览器下载。各种搜索改参数无果,求支援。
具体nginx.conf参数如下:
server{
listen80;
server_namelocalhost;
roothtml;
access_loglogs/host.access.logmain;
location/{
}
#error_page404/404.html;
#redirectservererrorpagestothestaticpage/50x.html
#
error_page500502503504/50x.html;
location=/50x.html{
roothtml;
}
location~\.php?${
fastcgi_pass127.0.0.1:9000;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
includefastcgi_params;
}
location~/\.ht{
denyall;
}
}
includevhost/*.conf;
vhosh/*.conf配置如下
server{
listen80;
server_namephpmyadmin.xxxxx.com;
roothtml/phpmyadmin;
#charsetkoi8-r;
access_loglogs/phpmyadmin.access.logmain;
#error_loglog/phpmyadmin.error.logmain;
location/{
indexindex.htmlindex.htmindex.php;
}
}
蛊毒传说
浏览 329回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript