0

我按照 arstechnia 的指南安装了sqlbuddy,但我似乎无法访问 sqlbuddy。

这是 /etc/nginx/sites-available/www 的设置

server {
        listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;

        root /usr/share/nginx/html;
        index index.html index.htm index.php;

        # Make site accessible from http://localhost/
        server_name localhost;

        location / {
                try_files $uri $uri/ =404;
                allow 192.168.1.0/24;
                allow 127.0.0.1;
                deny all;
        }
        location ~ \.php$ {
            try_files $uri =404;
            allow 192.168.1.0/24;
            allow 127.0.0.1;
            deny all;
            include fastcgi_params;
            fastcgi_pass php5-fpm-sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_intercept_errors on;
            }
        location ~ /\. {access_log off; log_not_found off; deny all; }
        location ~ ~$ {access_log off; log_not_found off; deny all; }
        location ~ /sqlbuddy/.*\.php$ {
            allow 192.168.1.0/24;
            allow 127.0.0.1;
            deny all;
            try_files $uri =404;
            include fastcgi_params;
            fastcgi_pass php5-fpm-sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_intercept_errors on;
        }

}

当我尝试通过 192.168.1.128/sqlbuddy 访问 sqlbuddy 时,我从 chrome 获取此页面:http: //imgur.com/8pomz3m

Nginx 访问日志没有显示我尝试访问 sqlbuddy 的记录,但确实记录了我访问索引页和 192.168.1.128/phpinfo.php

nginx 错误日志中也没有错误。

我尝试单独评论该位置的部分 ~ /sqlbuddy/... 无济于事。真的输在了这个上。

4

2 回答 2

2

按照相同的指南,我遇到了同样的问题。

我注释掉了对 sqlbuddy 的所有请求都通过 https 的位置,我看到你没有它,所以它不应该是一个问题。

尝试删除浏览器的缓存。这对我来说很重要。

希望能帮助到你。-

于 2014-02-28T18:28:54.920 回答
0

检查您的 sqlbuddy 文件夹结构,确保您的索引位于 /sqlbuddy/index.php 而不是 /sqlbuddy/src/index.php。我必须将所有源复制到 /sqlbuddy。

还要检查您对 sqlbuddy (www-data:www-data) 的权限和所有者。

于 2013-09-14T19:08:58.523 回答