2016-10-04 13 views
0

私はnginxとhhvmをインストールし、ubuntu VM上でプロセスとして実行しています。設定は以下にコピーされます。私はindex.phpファイルを/ usr/share/nginx/html(nginxによって指し示されている)に置いていますが、nginxによって提供されたサイトのbeignにアクセスしようとすると、hhvmに関する次のエラーが表示されます:nginxでhhvmを使用することができません

/var

2016/10/04 12:03:05 [crit] 12443#0: *1 connect() to unix:/var/run/hhvm/hhvm.sock failed (2: No such file or directory) while connecting to upstr 
eam, client: xx.xxx.xxx.xxx, server: , request: "GET/HTTP/1.1", upstream: "fastcgi://unix:/var/run/hhvm/hhvm.sock:", host: "xx.xx.xx.xx" 

/log/nginx/error.log nginxの設定ファイル(設定の一部)

server { 

    listen 80 default_server; 

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

    location/{ 
     index index.php; 
     try_files $uri $uri/ $uri/index.php$args /index.php$args; 
    } 

    location /mysql { 
     index index.php; 
    } 

    location ~* \.(php)$ { 
     try_files $uri = 404; 
     location ~ \..*/.*\.php$ {return 404;} 
     fastcgi_split_path_info ^(.+\.php)(/.+)$; 
     fastcgi_keep_conn on; 
     fastcgi_pass unix:/var/run/hhvm/hhvm.sock; 
     fastcgi_index index.php; 
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
     include  fastcgi_params; 
    } 

私がチェックした - bothhのnginxとhhvmプロセスが実行されています。これをさらにトラブルシューティングする方法についてのご意見はありますか?更新

: は、私は次のようには/ etc/hhvmにserver.iniファイルを変更し、サービスを再起動するが、私がされて9000ポートをコメントアウト

hhvm.server.file.socket=/var/run/hhvm/hhvm.sock 

仕事に行っているようには見えません以前に使用されました。

更新: server.init変更を行うとhhvm再起動した後、私は/var/log/hhvm/error.logで次のエラーを取得する:

Unable to read pid file /var/run/hhvm/pid for any meaningful pid 
Unable to read pid file /var/run/hhvm/pid for any meaningful pid 
Unable to read pid file /var/run/hhvm/pid for any meaningful pid 
Unable to read pid file /var/run/hhvm/pid for any meaningful pid 
Unable to read pid file /var/run/hhvm/pid for any meaningful pid 
Unable to start page server 
Shutting down due to failure(s) to bind in HttpServer::runAndExitProcess 

の/ var /実行/ hhvmディレクトリはwww-dataが所有しています

+0

hhvmが動作していて、ソケットファイルが正しく設定されていますか( '/ etc/hhvm/server.ini'などのファイルが実際の問題を診断するのに便利かもしれません)。 hhvm docs [here](https://docs.hhvm.com/hhvm/advanced-usage/fastCGI) –

+0

[サーバー障害](http://serverfault.com) – Machavity

答えて

1

ポート9000でhhvmを実行し、(ファイルソケットオプションを使用する代わりに)ポートを指すようにnginx(fasgcgi_pas)を指摘しました。

+0

でよく聞かれるかもしれません。あなたの答えを読んでください私はhhvmが9000を使用するように設定されていたが、別のアプリケーションがすでにそれを使用していたことを認識しましただから私は9009に変更し、それは働いた。ありがとう! –

関連する問題