我按照 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/... 无济于事。真的输在了这个上。