nginx配置多个静态资源
#user nobody;
worker_processes ; worker_cpu_affinity ; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections ;
} http {
include mime.types;
default_type application/octet-stream;
client_max_body_size 20m; sendfile on;
keepalive_timeout ;
underscores_in_headers on; upstream fdfs_group1 {
server 127.0.0.1:;
}
#gzip on; server {
listen ;
server_name dev.dongshanhaibao.com;
#charset koi8-r; #access_log logs/host.access.log main;
rewrite ^(.*)$ https://$host$1 permanent;
} server {
listen ssl;
server_name dev.dongshanhaibao.com; ssl on;
ssl_certificate ssl/2844030_dev.dongshanhaibao.com.pem;
ssl_certificate_key ssl/2844030_dev.dongshanhaibao.com.key;
ssl_session_cache shared:SSL:5m;
ssl_session_timeout 25m; ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on; location / {
# root html;
# index index.html index.htm;
proxy_pass http://localhost:9002/;
proxy_set_header Host $http_host; }
location /www1{
alias /usr/share/nginx/html;
index index.html index.php index.htm;
}
location /www2{
alias /usr/share/nginx/dist;
index index.html index.php index.htm;
}
location /group1/M00 {
proxy_pass http://fdfs_group1;
}
location /adminw {
proxy_pass http://localhost:9001/;
proxy_set_header Host $http_host;
}
}
}

nginx配置多个静态资源的更多相关文章
- nginx配置访问本地静态资源
下面说说如何在windows下使用nginx作为静态资源服务器, 1.修改config目录下,这个配置文件,基本上所有的配置都在这里面做, 2.主要的配置参数如下,一些无关的参数我直接去掉了,注意,里 ...
- 二.Nginx反向代理和静态资源服务配置
2018年03月31日 10:30:12 麦洛_ 阅读数:1362更多 所属专栏: nginx 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/M ...
- nginx实践(一)之静态资源web服务
静态资源服务场景CDN 配置语法-文件读取(nginx优势之一sendfile) 配置语法-tcp_nopush 简单的说就是把多个包合并,一次传输给客户端 配置语法-tap_nodelay 配置语法 ...
- Nginx反向代理Tomcat静态资源无法加载以及请求链接错误
在使用Nginx实现Tomcat的负载均衡的时候,项目发布到了Tomcat,Nginx也配置好了, 当访问的时候发现了与预期不符 表现为: 静态资源加载失败 链接跳转地址错误 下面是我错误的配置文件 ...
- nginx 配置简单的静态页面
nginx 文件服务配置,MIME和 default_type https://blog.csdn.net/qq_26711103/article/details/81116900 nginx 静态页 ...
- Gradle里配置jetty实现静态资源的热部署
通过Gradle我们可以很方便的使用内置jetty启动我们的web程序,在本地进行调试.但是在使用的过程中,我发现了几个问题,导致本地调试的效率大受影响. 如果使用gradle jettyRun启动j ...
- 通过配置tomcat虚拟路径配置站点的静态资源
我们常常站点中会提供给用户上传文件.图片.视频或者诸如为了提高性能生成的静态文件等存储在站点应用中.但如果静态资源文件和项目文件在同一个目录下,当我们重新部署文件时,war重新解压会导致静态资源文件的 ...
- springboot配置spring security 静态资源不能访问
在springboot整合spring security 过程中曾遇到下面问题:(spring boot 2.0以上版本 spring security 5.x (spring secur ...
- WebConfig配置,添加静态资源,外部可以直接访问地址
此配置是处理springboot拦截静态文件的 代码如下: @Configuration public class WebMvcConfig implements WebMvcConfigurer { ...
随机推荐
- 6.GC垃圾回收算法和垃圾收集器的关系
JAVAGC垃圾回收机制和常见垃圾回收算法 推荐博客:JVM垃圾回收机制和常见垃圾回收算法 JVM的内存结构.垃圾回收算法
- DOM的重绘和回流及代码性能优化
1.DOM的重绘和回流Repaint&Reflow 1.1重绘:元素样式的改变(但宽高.大小.位置等不变) 如outline.visibility.color.background-color ...
- C++ STL priority_queue 优先队列
优先队列: 与队列的用法是一样的,优先队列内部是通过堆来排序实现的, #include<iostream> #include <queue> using namespace s ...
- python-使用skimage显示图片
import skimage.io import skimage.transform import matplotlib.pyplot as plt img = skimage.io.imread(' ...
- thinkphp的运行
打开cmd切换到www目录下运行think E:\wamp64\www>php think run ThinkPHP Development server is started On <h ...
- yii2-CaptchaAction macos500 不显示
把公司一个项目pull到本地 发现验证码不输出了 怀疑是gd库没装 php -m看了下 gd库是装了的 有搜索到可能是因为自带的php拓展生成不了png(觉得不太可能) 试了下自己写一个图片生成pn ...
- 为了Runtime Broke 关了一堆东西
可是,好像还是不行啊?CPU还是用了 10-20% 还得写这个随笔,怕自己关东西关多了,以后还得回复. https://www.drivereasy.com/knowledge/runtime-bro ...
- Educational Codeforces Round 69 (Rated for Div. 2) C. Array Splitting 水题
C. Array Splitting You are given a sorted array
- paramiko简介
一.什么是paramiko 要想明白什么是paramiko,要先明白ssh协议. 二.什么是ssh协议 ssh全称是Secure Shell (翻译:安全的外壳),根据字面意思就可以知道是和安全相关的 ...
- 生成 Visual Studio 中的代码的文档生成神器
当我们在团队开发中的时候,经常要给别人提供文档,有了这个工具,设置一下,一键生成.前提是你要写好xml注释. 这也是开源项目: https://sandcastle.codeplex.com/ 它就是 ...