Run LNMP Environment Interface 502,nginx error log hint/run/php/php7.0-fpm.sock failed in Docker

Source: Internet
Author: User
Tags fpm

Docker running LNMP development Environment, interface report 502 error into Docker

Docker exec-it Createid    Bash

Error message:

2017/06/26 14:45:14 [Crit] 11#11: *21 connect () to Unix:/run/php/php7.0-fpm.sock failed (2:no such file or directory) whi Le connecting to upstream, client:172.19.0.1, server:127.0.0.1, Request: "Get/user/index http/1.1", Upstream: "FastCGI: Unix:/run/php/php7.0-fpm.sock: ", Host:" 127.0.0.1 "

Hint is not found/run/php/php7.0-fpm.sock file, enter/run, found only/run/php7.0-fpm.sock. Change the Fastcgi_pass configuration in the Docker nginx configuration file to/run/php7.0-fpm.sock and reboot the Docker

    Location ~ \.php$ {
        include snippets/fastcgi-php.conf;

        # with php7.0-cgi alone:
        #fastcgi_pass 127.0.0.1:9000;
        # with PHP7.0-FPM:
        fastcgi_pass unix:/run/php7.0-fpm.sock;
    

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.