Linux 无法访问nginx服务器上的sqlbuddy
我按照指南安装了sqlbuddy,但似乎无法访问sqlbuddy 这是/etc/nginx/sites available/www的设置Linux 无法访问nginx服务器上的sqlbuddy,linux,nginx,sqlbuddy,Linux,Nginx,Sqlbuddy,我按照指南安装了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;
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获得了以下页面:
Nginx访问日志没有显示我试图访问sqlbuddy的记录,但记录了我访问索引页和192.168.1.128/phpinfo.php的情况
nginx错误日志中也没有错误
我试着对位置~/sqlbuddy/…的各个部分分别进行注释。。。无济于事。在这一点上,你真的迷路了。检查你的sqlbuddy文件夹结构,确保你的索引在/sqlbuddy/index.php中,而不是在/sqlbuddy/src/index.php中。我必须将所有源代码复制到/sqlbuddy
还要检查sqlbuddy(www-data:www-data)的权限和所有者。按照相同的指南,我遇到了相同的问题 我注释掉了所有通过https向sqlbuddy发出请求的位置,我发现您没有它,所以这不应该是一个问题 尝试删除浏览器的缓存。这对我来说很重要
希望有帮助。-您的nginx是否在您自己的计算机上本地运行?