社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
#user nobody;
worker_processes 1;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
sendfile on;
#keepalive_timeout 0;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
location /image{
alias F:/faces/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
接下来就是访问了 浏览器输入localhost:8080/image/文件名
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!