为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

蛊毒传说 2019-04-19 15:59:25
具体环境为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;}}
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 328 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信