[why] haven't define some file(*.log) behavior of browser in mime.types, so download this file on browser. [how] 1. add correspondence of file in mime.types 2. add default type in default.conf in case of other type file that haven't define in mime.types
Signed-off-by: Lu Weitao luweitaobe@163.com --- container/srv-http/root/etc/nginx/conf.d/default.conf | 1 + container/srv-http/root/etc/nginx/mime.types | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/container/srv-http/root/etc/nginx/conf.d/default.conf b/container/srv-http/root/etc/nginx/conf.d/default.conf index 9c15d99..91371f1 100644 --- a/container/srv-http/root/etc/nginx/conf.d/default.conf +++ b/container/srv-http/root/etc/nginx/conf.d/default.conf @@ -13,6 +13,7 @@ server { }
location / { + default_type text/html; autoindex on; autoindex_localtime on; allow all; diff --git a/container/srv-http/root/etc/nginx/mime.types b/container/srv-http/root/etc/nginx/mime.types index e7f2f1c..a4ee74b 100644 --- a/container/srv-http/root/etc/nginx/mime.types +++ b/container/srv-http/root/etc/nginx/mime.types @@ -4,8 +4,8 @@ types { text/css css; text/xml xml; text/yaml yaml; - text/plain txt time data sh; + text/plain txt time data sh log;
application/json json; - application/x-gzip gz tgz; + application/x-gzip gz tgz cgz; }
On Thu, Nov 12, 2020 at 10:23:41AM +0800, Lu Weitao wrote:
[why] haven't define some file(*.log) behavior of browser in mime.types, so download this file on browser. [how]
- add correspondence of file in mime.types
- add default type in default.conf in case of other type file that
haven't define in mime.types
Download before, don't download now? Or don't download before, download now?
I think you should say it clearly.
Thanks, Yuanchao
On Thu, Nov 12, 2020 at 10:47:38AM +0800, Li Yuanchao wrote:
On Thu, Nov 12, 2020 at 10:23:41AM +0800, Lu Weitao wrote:
[why] haven't define some file(*.log) behavior of browser in mime.types, so download this file on browser. [how]
- add correspondence of file in mime.types
- add default type in default.conf in case of other type file that
haven't define in mime.types
Download before, don't download now? Or don't download before, download now?
download before fix,
display file content directly after fix
I think you should say it clearly.
ok
Thanks, Weitao
Thanks, Yuanchao
By the way, the mail system show that email address end with "@huawei.com" can not be reached, you can delete these address in your config file.
Thanks, Yuanchao