当前位置:首页 > CN2资讯 > 正文内容

Nginx简单配置(一)windows图片服务器

1天前CN2资讯
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include 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 logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root d:\GisTest;#设置D:\GisTest 为documentroo index index.html index.htm; } #定义图片服务器的目录位置。凡以jpg之类结尾的全部甩到此目录下面去 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|txt)$ { root d:\GisTest;#设置D:\GisTest 为documentroo expires 24h; #设置过期时间 } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} }
    你可能想看:

    扫描二维码推送至手机访问。

    版权声明:本文由皇冠云发布,如需转载请注明出处。

    本文链接:https://www.idchg.com/info/30942.html

    分享给朋友:

    “Nginx简单配置(一)windows图片服务器” 的相关文章

    国外服务器推荐:提升您的在线业务效率的最佳选择

    在如今全球化的时代,选择合适的国外服务器显得尤为重要。互联网的快速发展让许多企业不仅仅局限于当地市场,跨国经营已成为常态。这种趋势使得大量用户开始寻找更为高效、灵活的服务器解决方案,以满足不同地区客户的需求。服务器不仅是维护在线业务的基础设施,还是保证用户体验的关键因素。 选择国外服务器时,不仅需要...

    获取国外动态IP服务的指南与优势

    在当今互联网的世界中,动态IP(Dynamic IP)逐渐成为了一个重要的概念。它指的是由互联网服务提供商(ISP)动态分配的、可变的IP地址。与固定不变的静态IP相比,每次连接互联网时,动态IP都可能发生变化。这种灵活性不仅高效利用了IP资源,还在多个领域产生了实际应用的优势。 动态IP的特点非常...

    Zolerani云服务器评测与市场分析:高性价比的选择

    Zolerani是一个充满活力的云服务器品牌,属于葡萄牙的HLISTAN ZOLERANI, UNIPESSOAL LDA公司旗下。最近,我对这个品牌进行了深入的研究,发现它在全球VPS云服务器市场上取得了显著的发展。Digitalcloud是Zolerani的主打品牌,于2023年2月正式成立,专...

    GoDaddy虚拟主机全面指南:轻松搭建您理想的网站

    GoDaddy虚拟主机概述 提到GoDaddy,很多人首先会想到它作为域名注册商的地位。但是,GoDaddy不仅限于此,提供虚拟主机服务的实力也不容小觑。对于想要在网上建立个人博客、企业站点或者电子商务平台的朋友来说,GoDaddy的虚拟主机服务是一个值得考虑的选项。它的多样性和可靠性,吸引了不少新...

    dataonline3:高效的数据管理与分析工具

    1. dataonline3概述 在当今这个数据驱动的时代,dataonline3作为一个先进的数据管理工具,受到了广泛关注。它整合了丰富的数据处理功能,使用户能够轻松地收集、分析和展示数据。用户无论是在科研、企业还是个人项目中,dataonline3都提供了便利和强大的支持。 dataonline...

    easyvm:轻松创建和管理虚拟机的虚拟化解决方案

    什么是 easyvm easyvm 是一种轻量级的虚拟化解决方案,旨在帮助用户快速、简单地创建和管理虚拟机。面对日益增长的技术需求和IT成本压力,easyvm 提供了一个灵活且易于使用的平台,适合不同技术水平的用户。它不仅支持多种操作系统的虚拟化,还能够满足不同开发、测试以及生产环境的需求。每个人都...