nginx如何配置alias到phpmyadmin

29次阅读
没有评论

共计 1149 个字符,预计需要花费 3 分钟才能阅读完成。

自动写代码机器人,免费开通

这篇文章主要介绍了 nginx 如何配置 alias 到 phpmyadmin,具有一定借鉴价值,需要的朋友可以参考下。希望大家阅读完这篇文章后大有收获。下面让丸趣 TV 小编带着大家一起了解一下。

说明

1)网站  localhost  存放目录:D:/localhost,访问地址:http://localhost/
2)phpmyadmin  的程序存放目录:D:/wamp/apps/phpmyadmin4.1.14

需求

 将  localhost  的  phpmyadmin  别名指向  D:/wamp/apps/phpmyadmin4.1.14  目录。

实现

server {
 listen 80;
 server_name localhost 127.0.0.1;
 root d:/localhost;
 index index.html index.htm index.php; 
 autoindex on; 
 autoindex_exact_size off;
 autoindex_localtime on; 
 location /phpmyadmin/ {
 alias D:/wamp/apps/phpmyadmin4.1.14;
 index index.php;
 }
 location ~ \.php$ {
 try_files $uri =404;
 fastcgi_pass 127.0.0.1:9000;
 fastcgi_index index.php;
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 include fastcgi_params; 
 }
 #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 html;
 }
 location ~ /\.(ht|svn|git) {
 deny all;
 }
}

错误

1)  一直都实现不了。2)如果是 Apache 就非常方便   直接  alias /phpmyadmin D:/wamp/apps/phpmyadmin4.1.14  就可以 

感谢你能够认真阅读完这篇文章,希望丸趣 TV 小编分享 nginx 如何配置 alias 到 phpmyadmin 内容对大家有帮助,同时也希望大家多多支持丸趣 TV,关注丸趣 TV 行业资讯频道,遇到问题就找丸趣 TV,详细的解决方法等着你来学习!

向 AI 问一下细节

丸趣 TV 网 – 提供最优质的资源集合!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-12-18发表,共计1149字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)