V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
coolicer
V2EX  ›  NGINX

php跳转不正确是什么问题。

  •  
  •   coolicer · Dec 13, 2013 · 3285 views
    This topic created in 4530 days ago, the information mentioned may be changed or developed.
    我自己下载了phpMyAdmin,然后登录的时候会跳到根目录。要自己补回目录才能进去,网上查到有一个跟我一样的。他加了在config加了SCRIPT_FILENAME和SCRIPT_NAME就可以了,可是我已经是加了这些东西在fastcgi_params。

    server {
    listen 80;
    server_name localhost;
    root /home/wwwroot;
    index index.html index.htm index.php;

    # location /pma {
    # index index.php;
    # }
    # location ~ ^/pma/.*\.(php|php5)$ {
    # fastcgi_pass unix:/var/run/php5-fpm.sock;
    # include fastcgi_params;
    # fastcgi_index index.php;
    # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    # fastcgi_split_path_info ^(.+\.php)(.*)$;
    # }

    if (!-e $request_filename) {
    rewrite ^/(.*)$ /index.php/$1 last;
    break;
    }

    location ~ \.php
    {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_split_path_info ^(.+\.php)(.*)$;
    include fastcgi_params;
    }
    }
    ~
    1 replies    1970-01-01 08:00:00 +08:00
    txlty
        1
    txlty  
       Dec 14, 2013
    可能你用 localhost/phpmyadmin 访问的
    试试 localhost/phpmyadmin/ (把后面反斜杠补全)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5888 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 70ms · UTC 06:14 · PVG 14:14 · LAX 23:14 · JFK 02:14
    ♥ Do have faith in what you're doing.