nginx - php artisan serve 运行在8000 访问502报错
迷茫
迷茫 2017-04-11 10:37:30
0
0
572

在虚拟机(192.168.73.130)中 运行 php artisan serve
Laravel development server started on http://localhost:8000/
访问http://192.168.73.130:8000
结果:ERR_CONNECTION_REFUSED

于是在虚拟机nginx中配置一个转发:

server {
                listen 0.0.0.0:80;
                server_name lara.com;

        location / {
                proxy_set_header Host $http_host;
                proxy_set_header X-NginX-Proxy true;
                proxy_set_header X-Real-IP $remote_addr;

                proxy_pass http://localhost:8000;
                #proxy_buffering off;
                proxy_redirect on;
                }
        }

在本地浏览器中访问lara.com显示 502 Bad Gateway
在shell里面去curl http://localhost:8000/ 是会有html返回的
是我的nginx配置不对吗
求解(laravel的环境 好麻烦!!!)

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

모든 응답(0)
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!