V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
coolicer
V2EX  ›  NGINX

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

  •  
  •   coolicer · 2013-12-13 12:00:15 +08:00 · 2691 次点击
    这是一个创建于 3758 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我自己下载了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 条回复    1970-01-01 08:00:00 +08:00
    txlty
        1
    txlty  
       2013-12-14 15:29:59 +08:00
    可能你用 localhost/phpmyadmin 访问的
    试试 localhost/phpmyadmin/ (把后面反斜杠补全)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3142 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 13:01 · PVG 21:01 · LAX 06:01 · JFK 09:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.