Answer the question
In order to leave comments, you need to log in
nginx. How to give statics through proxy_pass?
Firework!
There is a pretty simple configuration
location / {
proxy_pass http://172.16.18.20:7777/;
}
location /i {
proxy_pass http://172.16.18.20:7777/i/;
}
location ~* /mw-config/ {
return 444;
}
location ~* /maintenance/ {
return 444;
}
location ^~ /wiki {
try_files /exwiki/$uri /exwiki/$uri/ @exwiki;
}
location @exwiki {
rewrite /wiki(.*) /exwiki/index.php;
}
location ~* \.php {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 512k;
fastcgi_pass unix:/var/run/php-fpm/www.sock;
}
location ~* \.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$ {
access_log off;
expires max;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question