<bdo id='Fk4eL'></bdo><ul id='Fk4eL'></ul>
  • <tfoot id='Fk4eL'></tfoot>

      <legend id='Fk4eL'><style id='Fk4eL'><dir id='Fk4eL'><q id='Fk4eL'></q></dir></style></legend>

        <small id='Fk4eL'></small><noframes id='Fk4eL'>

        <i id='Fk4eL'><tr id='Fk4eL'><dt id='Fk4eL'><q id='Fk4eL'><span id='Fk4eL'><b id='Fk4eL'><form id='Fk4eL'><ins id='Fk4eL'></ins><ul id='Fk4eL'></ul><sub id='Fk4eL'></sub></form><legend id='Fk4eL'></legend><bdo id='Fk4eL'><pre id='Fk4eL'><center id='Fk4eL'></center></pre></bdo></b><th id='Fk4eL'></th></span></q></dt></tr></i><div id='Fk4eL'><tfoot id='Fk4eL'></tfoot><dl id='Fk4eL'><fieldset id='Fk4eL'></fieldset></dl></div>
      1. 登录后带有phpmyadmin的Nginx错误重定向

        Nginx with phpmyadmin wrong redirect after login(登录后带有phpmyadmin的Nginx错误重定向)

          <tbody id='GyUpV'></tbody>

            • <bdo id='GyUpV'></bdo><ul id='GyUpV'></ul>
                <legend id='GyUpV'><style id='GyUpV'><dir id='GyUpV'><q id='GyUpV'></q></dir></style></legend>
              • <small id='GyUpV'></small><noframes id='GyUpV'>

                  <i id='GyUpV'><tr id='GyUpV'><dt id='GyUpV'><q id='GyUpV'><span id='GyUpV'><b id='GyUpV'><form id='GyUpV'><ins id='GyUpV'></ins><ul id='GyUpV'></ul><sub id='GyUpV'></sub></form><legend id='GyUpV'></legend><bdo id='GyUpV'><pre id='GyUpV'><center id='GyUpV'></center></pre></bdo></b><th id='GyUpV'></th></span></q></dt></tr></i><div id='GyUpV'><tfoot id='GyUpV'></tfoot><dl id='GyUpV'><fieldset id='GyUpV'></fieldset></dl></div>

                  <tfoot id='GyUpV'></tfoot>
                • 本文介绍了登录后带有phpmyadmin的Nginx错误重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 nginx 设置 phpMyAdmin.我可以通过 http://localhost/phpmyadmin 访问 phpMyAdmin.但是,当我登录时,URL 被重定向到 http://localhost/sql.php 而不是 http://localhost/phpmyadmin/sql.php.

                  I'm setting up phpMyAdmin with nginx. I can visit phpMyAdmin at http://localhost/phpmyadmin. However, when I logged in, the URL is redirected to http://localhost/sql.php instead of http://localhost/phpmyadmin/sql.php.

                  我的/var/www/html/文件夹中有 phpMyAdmin 符号链接.

                  I have phpMyAdmin symlinked in my /var/www/html/ folder.

                  sudo ln -s/usr/share/phpmyadmin/var/www/html/phpmyadmin

                  server {
                      listen 80 default_server;
                      listen [::]:80 default_server;
                  
                      # SSL configuration
                      #
                      # listen 443 ssl default_server;
                      # listen [::]:443 ssl default_server;
                      #
                      # Note: You should disable gzip for SSL traffic.
                      # See: https://bugs.debian.org/773332
                      #
                      # Read up on ssl_ciphers to ensure a secure configuration.
                      # See: https://bugs.debian.org/765782
                      #
                      # Self signed certs generated by the ssl-cert package
                      # Don't use them in a production server!
                      #
                      # include snippets/snakeoil.conf;
                  
                      root /var/www/html;
                  
                      # Add index.php to the list if you are using PHP
                      index index.html index.htm index.nginx-debian.html index.php;
                  
                      server_name _;
                  
                      location / {
                          # First attempt to serve request as file, then
                          # as directory, then fall back to displaying a 404.
                          try_files $uri $uri/ =404;
                      }
                  
                      # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
                      #
                      location ~ .php$ {
                          include /etc/nginx/snippets/fastcgi-php.conf;
                          # With php7.0-fpm:
                          fastcgi_pass unix:/run/php/php7.0-fpm.sock;
                          include fastcgi_params;
                      }
                  
                      # deny access to .htaccess files, if Apache's document root
                      # concurs with nginx's one
                      #
                      #location ~ /.ht {
                      #   deny all;
                      #}
                  }
                  

                  推荐答案

                  今天我实际上在 StackOverflow 上经历了这么多解决方案,遗憾的是没有一个有效,有些甚至给出了一些可怕的建议.可怕的是我遇到了多少被标记为答案的问题.

                  I have actually been through so many solutions on StackOverflow today and sadly none of which work and some even given some horrid recommendations. What's scary is how many I came across that were marked as answers.

                  我刚刚做了一个全新的 Ubuntu 16.04 LEMP 服务器,今天早上一切都干净地安装了 Nginx、mySQL、PHP7.0 和 PhpMyAdmin.

                  I just did a brand new Ubuntu 16.04 LEMP server, everything cleanly installed this morning Nginx, mySQL, PHP7.0 and PhpMyAdmin.

                  这个重定向到

                  h**p://my.server.ip/

                  h**p://my.server.ip/

                  在登录 phpymadmin 而不是

                  after logging into phpymadmin instead of

                  h**p://my.server.ip/phpmyadmin

                  h**p://my.server.ip/phpmyadmin

                  实际上与您阅读的所有指南推荐的将 cgi.fix_pathinfo 设置为 0 无关.阅读更多关于为什么它应该在你的 php.ini 文件中设置为 0 并且不要像上面那样直接禁用它.

                  is nothing actually to do with the cgi.fix_pathinfo being set to 0 as recommended by all those guides you read. Read up a little more on why it should be set to 0 in your php.ini file and don't just go and disable it as above.

                  换句话说,在 PHP 的配置文件中保留(如向您推荐的)cgi.fix_pathinfo = 0.

                  So in other words leave (as recommended to you) cgi.fix_pathinfo = 0 in your config file for PHP.

                  修复 来自这个网站(唯一有正确答案的网站)是将以下内容添加到您的/etc/nginx/sites-available/default 配置文件中.然后重新启动 Nginx ... 立即生效,登录后不再重定向回 root.

                  THE FIX from this web site (the only one with the correct answer) is to add the following to your /etc/nginx/sites-available/default configuration file. Then restart Nginx ... works immediately, no more re-directing back to root after login.

                  # Phpmyadmin Configurations
                      location /phpmyadmin {
                         root /usr/share/;
                         index index.php index.html index.htm;
                         location ~ ^/phpmyadmin/(.+.php)$ {
                                 try_files $uri =404;
                                 root /usr/share/;
                                 fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                                 fastcgi_index index.php;
                                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                                 include fastcgi_params;
                         }
                         location ~* ^/phpmyadmin/(.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                                 root /usr/share/;
                         }
                     }
                  
                     location /phpMyAdmin {
                         rewrite ^/* /phpmyadmin last;
                     }
                  

                  这篇关于登录后带有phpmyadmin的Nginx错误重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  <tfoot id='052dN'></tfoot>
                    <legend id='052dN'><style id='052dN'><dir id='052dN'><q id='052dN'></q></dir></style></legend>

                      <tbody id='052dN'></tbody>
                      <bdo id='052dN'></bdo><ul id='052dN'></ul>

                    • <small id='052dN'></small><noframes id='052dN'>

                          • <i id='052dN'><tr id='052dN'><dt id='052dN'><q id='052dN'><span id='052dN'><b id='052dN'><form id='052dN'><ins id='052dN'></ins><ul id='052dN'></ul><sub id='052dN'></sub></form><legend id='052dN'></legend><bdo id='052dN'><pre id='052dN'><center id='052dN'></center></pre></bdo></b><th id='052dN'></th></span></q></dt></tr></i><div id='052dN'><tfoot id='052dN'></tfoot><dl id='052dN'><fieldset id='052dN'></fieldset></dl></div>