ちょっとしたサイド プロジェクトとして、ここから Nginx Web サーバーをセットアップする方法に関するガイドに従っています: http://arstechnica.com/information-technology/2012/12/web-served-part-4 -get-your-database-on/2/
Sqlbuddy をインストールするまでは、すべてうまくいきました。{server address}/sqlbuddy に移動しようとすると、ページが白いままになり、nginx の error.log に次のように表示されます。
2013/12/19 01:03:38 [error] 1949#0: *1 FastCGI sent in stderr: "PHP message: PHP Warning: include(/usr/share/nginx/html/sqlbuddy/includes/types.php): failed to open stream: No such file or directory in /usr/share/nginx/html/sqlbuddy/functions.php on line 28
PHP message: PHP Warning: include(): Failed opening '/usr/share/nginx/html/sqlbuddy/includes/types.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/nginx/html/sqlbuddy/functions.php on line 28
PHP message: PHP Warning: include(/usr/share/nginx/html/sqlbuddy/includes/class/GetTextReader.php): failed to open stream: No such file or directory in /usr/share/nginx/html/sqlbuddy/functions.php on line 29
PHP message: PHP Warning: include(): Failed opening '/usr/share/nginx/html/sqlbuddy/includes/class/GetTextReader.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/nginx/html/sqlbuddy/functions.php on line 29
PHP message: PHP Warning: include(/usr/share/nginx/html/sqlbuddy/includes/class/Sql.php): failed to open stream: No such file or directory in /usr/share/nginx/html/sqlbuddy/functions.php on line 34
PHP message: PHP Warning: include(): Failed opening '/usr/share/nginx/html/sqlbuddy/includes/class/Sql.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/nginx/html/sqlbuddy/functions.php on line 34
PHP message: PHP Fatal error: Class 'GetTextReader' not found in /usr/share/nginx/html/sqlbuddy/functions.php on line 128" while reading response header from upstream, client: 192.168.0.122, server: localhost, request: "GET /sqlbuddy/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.soc:", host: "192.168.0.123"
/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;
}
location ~ /sqlbuddy/.*\.php$ {
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;
}
location ~ \.php$ {
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;
}
location ~ /\. {access_log off; log_not_found off; deny all;}
location ~ ~$ {access_log off; log_not_found off; deny all;}
...unrelated...
}
私が取ったステップ:
- /html ディレクトリ全体とその下のすべてを chmod 755 しました
- chown www-data:www-data /sqlbuddy'ed ディレクトリ
- ユーザー名が www-data グループの一部であることを確認しました
- 上記の手順に従って、sqlbuddyを数回アンインストールして再インストールしました
- すべてのファイルを /sqlbuddy/src から /sqlbuddy に移動しました (これらのファイルを移動するかどうかにかかわらず、まだ壊れていることに注意してください)
- php-fpm、nginx、およびサーバー自体を数回再起動しました
言うまでもなく、これは非常に困惑しています。このような多くのことは、いわば私の給料水準を超えていることを認めます (これらはいくつかのハードコア エラーです)。