2014-10-09 114 views
0
server { 
     listen 80 default_server; 
     listen [::]:80 default_server ipv6only=on; 

     root /home/thinkshare/public/; 
     index index.php; 

     server_name domain_here; 

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

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

這是我目前Nginx的配置 - 我不能爲我的生活弄清楚究竟是發生在warrent上的連接,域或IP直接一個502網關錯誤。有什麼想法嗎?nginx的Laravel 4 - 502錯誤網關錯誤

編輯

刪除域名

回答

1

我能最終找到這個link答案。

實際上,nginx文件中的fastcgi_pass以及fpm文件中的listen需要更改爲127.0.0.1:9000。

0

權限插座是不正確的,以及爲什麼改變的原因頁首解決它

0

在Ubuntu的16.04我得到這個錯誤了。我解決它通過使用$sudo service php7.0-fpm restart

此錯誤編輯 /etc/php/7.0/fpm/pool.d/www.conf

user = yourname 
group = yourgroup 

listen.owner = yourname 
listen.group = yourgroup 

,並重新啓動php7.0fpm是由於您的路徑是不是在默認/var/www這是由www-data擁有的,當你在其他目錄,你應該設置它!