nginx? yii2 ????? ??? ? 502 ??? ????? ?? ??? ???? ?? ?? ???
Dec 05, 2016 pm 01:26 PM???? ? ?? ??? yii2? ???? ????? ???, ?? ????? ??? ????, nginx? ??? ? 502 ?? ????? ??? ???? ?? ?????. ??? ?? ?????. ? ??? ??? yii2? ??? ? ???? ?? ????? ????? ??? ??? ???.
1. ?? ? ?? ??
????: macOS, php ??: 5.6, nginx ??: 1.10.1, yii2 ??: 2.0.
2, yii2 ??
yii2 ??? ?? ?????. ?? ????? ???? ????? ???. ??? ??? ?? yii2-app-advanced(Yii 2 Advanced Project Template)???. ???? ??? github? ????. ?? ???? ???? ???? ?????.
3. nginx? yii2 ??
??? yii2-app-advanced ????? README?? nginx? ???? ??? ?? ???? ?? ????. ??? ??? ??? ?? ????. ??? ???? ?? ??? ??? README?? nginx ?? ????? ?? ???? 502 ??? ????? ??? ??????.
HTTP ?? ???? 5? ???? ?? ??? ?? ?? ??? ????? nginx ??? ?????.
?? ??:
?????? "fastcgi: //127.0.0.1:9090"? ?? ??? ??? ? ??? ????? ??? ??? ????.
php-fpm ??? ???????.
??, nginx ?? ????? ??? FastCGI ?? ?? ??? ???? nginx? FastCGI ????? ??? ?? ??? ???. ??? ????? ???? nginx? 502 ?? ??? ????? ???? ???? FastCGI ??? ???? ???? ????? ????.
4, ???
nginx ?? ????? fastcgi_pass? ??? ??? ???? ???? ? ??? ?????.
5, ??
(1) HTTP ?? ?? 5? ???? ??? ?? ??? ?????. 502 ??? ?????? ??? ????? ????? ?? ???? ???? ??(? ??)? ?? ?????. ??(fastcgi ??)? ??? ??? ?????.
(2) fastcgi_pass? ngx_http_fastcgi_module ??? ?? ?????, nginx ??? ???? ?? fastcgi ??? ??? ?????.
<span style="color: #008080;"> 1</span> <span style="color: #000000;">Syntax: fastcgi_pass address; </span><span style="color: #008080;"> 2</span> <span style="color: #0000ff;">Default</span><span style="color: #000000;">: — </span><span style="color: #008080;"> 3</span> Context: location, <span style="color: #0000ff;">if</span> <span style="color: #0000ff;">in</span><span style="color: #000000;"> location </span><span style="color: #008080;"> 4</span> <span style="color: #008080;"> 5</span> <span style="color: #000000;">Sets the address of a FastCGI server. The address can be specified as a domain name or IP address, and a port: </span><span style="color: #008080;"> 6</span> fastcgi_pass localhost:9000<span style="color: #000000;">; </span><span style="color: #008080;"> 7</span> <span style="color: #008080;"> 8</span> or as a UNIX-<span style="color: #000000;">domain socket path: </span><span style="color: #008080;"> 9</span> fastcgi_pass unix:/tmp/<span style="color: #000000;">fastcgi.socket; </span><span style="color: #008080;">10</span> <span style="color: #008080;">11</span> <span style="color: #0000ff;">If</span> a domain name resolves to several addresses, all of them will be used <span style="color: #0000ff;">in</span> a round-robin fashion. <span style="color: #0000ff;">In</span> addition, an address can be specified as a server group.
??:
HTTP ?? ??
fastcgi_pass
Syntax: | <strong>fastcgi_pass</strong>?<code><em>address</em> ; |
---|---|
Default: | — |
Context: |
location ,?if in location
|

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)