An error is reported when laravel is installed in the lnmp environment in ubuntu.

Source: Internet
Author: User
Tags connection reset
I am using the ubuntu Kirin version. After installing and configuring the lnmp environment, I used composer to install laravel4.2. The error 502 was reported. Check the nginx log and fpm log and find the following error: nginx. log: {code ...} php5-fpm log: {code ...} the nginx configuration file is as follows: {code... I am using the ubuntu Kirin version. After installing and configuring the lnmp environment, I used composer to install laravel4.2. The error 502 was reported. Check the nginx log and fpm log and find the following error:

Nginx. log:

2014/06/01 22:23:46 [error] 7572#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 127.0.0.1, server: www.tb.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.tb.com"

Php5-fpm log:

[02-Jun-2014 21:59:38] WARNING: [pool www] child 12547 exited on signal 11 (SIGSEGV - core dumped) after 13121.206611 seconds from start[02-Jun-2014 21:59:38] NOTICE: [pool www] child 13820 started

The nginx configuration file is as follows:

server {        listen 80;        #listen [::]:80 default_server ipv6only=on;        root /www/taobao/public;        index index.html index.htm index.php;        server_name www.tb.com;        location / {                try_files $uri $uri/ /index.php?$query_string;        }        location ~ \.php$ {                try_files $uri $uri/ =404;        #       fastcgi_split_path_info ^(.+\.php)(/.+)$;        #       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini        #        #       # With php5-cgi alone:        #       fastcgi_pass 127.0.0.1:9000;        #       # With php5-fpm:                fastcgi_pass unix:/var/run/php5-fpm.sock;                fastcgi_index index.php;                fastcgi_param SCRIPT_FILENAME /var/www/project/public$fastcgi_script_name;                include fastcgi_params;        }}

Another point is that it is okay to execute a single PHP file. In phpinfo, you can also see that all the extensions added have been installed.

Reply content:

I am using the ubuntu Kirin version. After installing and configuring the lnmp environment, I used composer to install laravel4.2. The error 502 was reported. Check the nginx log and fpm log and find the following error:

Nginx. log:

2014/06/01 22:23:46 [error] 7572#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 127.0.0.1, server: www.tb.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.tb.com"

Php5-fpm log:

[02-Jun-2014 21:59:38] WARNING: [pool www] child 12547 exited on signal 11 (SIGSEGV - core dumped) after 13121.206611 seconds from start[02-Jun-2014 21:59:38] NOTICE: [pool www] child 13820 started

The nginx configuration file is as follows:

server {        listen 80;        #listen [::]:80 default_server ipv6only=on;        root /www/taobao/public;        index index.html index.htm index.php;        server_name www.tb.com;        location / {                try_files $uri $uri/ /index.php?$query_string;        }        location ~ \.php$ {                try_files $uri $uri/ =404;        #       fastcgi_split_path_info ^(.+\.php)(/.+)$;        #       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini        #        #       # With php5-cgi alone:        #       fastcgi_pass 127.0.0.1:9000;        #       # With php5-fpm:                fastcgi_pass unix:/var/run/php5-fpm.sock;                fastcgi_index index.php;                fastcgi_param SCRIPT_FILENAME /var/www/project/public$fastcgi_script_name;                include fastcgi_params;        }}

Another point is that it is okay to execute a single PHP file. In phpinfo, you can also see that all the extensions added have been installed.

Do not use the one-click installation package.
Install php version 5.4 or later
Fastcgi uses ip: port. Do not use unix: sock

Script_name is configured with $ document_root, for example:

fastcgi_params SCRIPT_NAME $document_root$fastcgi_script_name;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.