具体环境为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 回答
慕桂英3389331
TA贡献2036条经验 获得超8个赞
huandu已经解答了你没有配置php解析部分,所谓nginx不知道你要通过什么方式去解析话说你用的lnmp.org的安装包,不太需要自己修改配置文件吧,顶多加个include*.conf用来解析urlwrite
添加回答
举报
0/150
提交
取消