常用MIME Type 配置

3 篇文章 0 订阅
Video TypeExtensionMIME Type
MPEG-4.mp4video/mp4
Ogg Video.ogvvideo/ogg
Flash Video.flvvideo/x-flv
A/V Interleave.avivideo/x-msvideo
Microsoft Windows Media.wmvvideo/x-ms-wmv
RealMedia Variable Bitrate.rmvbapplication/vnd.rn-realmedia-vbr
reine Textdateien.txttext/plain
ZIP-Archivdateien.zipapplication/zip
TAR.tarapplication/x-tar
Portable Network Graphics (PNG).pngimage/png
JPEG Image.jpeg, .jpgimage/jpeg
Graphics Interchange Format.gifimage/gif
Waveform Audio File Format (WAV).wavaudio/x-wav
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
nginx的配置文件位于 /etc/nginx/nginx.conf,可以通过以下命令打开: ``` sudo nano /etc/nginx/nginx.conf ``` 配置文件的基本格式如下: ``` events { # 配置事件模型 } http { # 配置http模块 server { # 配置server模块 } } ``` 其中,events、http、server都是nginx的模块,可以分别进行配置。 events模块用于配置nginx的事件模型,通常不需要修改。http模块用于配置http相关的设置,如日志、缓存、代理等。server模块用于配置虚拟主机,可以配置多个server块实现多个虚拟主机。 以下是一个简单的nginx配置示例: ``` worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; gzip on; server { listen 80; server_name example.com; location / { root /usr/share/nginx/html; index index.html index.htm; } error_page 404 /404.html; location = /404.html { root /usr/share/nginx/html; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } } } ``` 在这个配置文件中,我们定义了一个worker进程、一个error日志和一个pid文件。在events模块中,我们定义了最大连接数为1024。在http模块中,我们定义了mime类型、日志格式、gzip压缩等常用设置。在server模块中,我们定义了一个虚拟主机,监听80端口,使用example.com域名,并定义了location匹配规则和错误页面。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值