nginx 反向代理與動靜分離
http { include mime types; default_type application octet-stream; tcp_nopush mime.types;
default_type application/octet -stream; #tcp_nopush on;
keepalive_timeout 65;
upstream test{
server 192.16:150 80;
}
server {
listen 80;
{ root html;
index 00 502 503 504 /50x.html;
location = /50x.html {
location ~ .php$ {
proxy_pass http://test; 後方不能加上/http://test/是錯誤的
}
location ~pmp )${
root /test/web;
expires 3d;
以上就介紹了nginx 反向代理及動靜分離,包括了方面的內容,希望對PHP教程有興趣的朋友有所幫助。