网站首页 > 技术教程 正文
开启目录浏览功
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
charset utf-8,gbk; #解决乱码
location / {
root html;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on; #网站根目录开启目录浏览功能
index index.html index.htm;
}
location /AW {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on; #网站根目录下AW目录开启目录浏览功能
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
URL跳转
worker_processes 2;
worker_cpu_affinity 0001 0010;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root html;
charset utf-8,gbk;
rewrite “^/(.*)$” http://3.15.39.1/AW last;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /AW {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
}
include vhost/*.conf;
}
猜你喜欢
- 2024-10-10 nginx下载加速器:X-Accel-Redirect的使用教程
- 2024-09-16 Nginx-包教包会-进阶(nginx help)
- 2024-09-16 前端单页面应用怎么做跳转拦截?试试“动态路由”
- 2024-09-16 Nginx实现URL重写(nginx重写rewrite)
- 2024-09-16 今天教大家Nginx+tomcat负载均衡群集如何配置
- 2024-09-16 【低代码课堂】低代码平台如何借助Nginx实现网关服务
- 2024-09-16 云服务器环境搭建中的nginx部分(nginx服务器搭建和配置)
- 2024-09-16 Nginx+tomcat实现高并发场景的动静分离和负载均衡,程序员收藏了
- 2024-09-16 Nginx教程(nginx简书)
- 2024-09-16 Nginx+SpringBoot实现负载均衡(nginx负载均衡的策略)
你 发表评论:
欢迎- 最近发表
-
- Linux新手必看:几种方法帮你查看CPU核心数量
- linux基础命令之lscpu命令(linux中ls命令的用法)
- Linux lscpu 命令使用详解(linux常用ls命令)
- 如何查询 Linux 中 CPU 的数量?这几个命令要知道!
- 在linux上怎么查看cpu信息(linux如何查看cpu信息)
- 查看 CPU 的命令和磁盘 IO 的命令
- 如何在CentOS7上改变网卡名(centos怎么改网卡名字)
- 网工必备Linux网络管理命令(网工必备linux网络管理命令是什么)
- Linux 网络命令知多少(linux 网络 命令)
- Linux通过命令行连接wifi的方式(linux命令行连接无线网)
- 标签列表
-
- 下划线是什么 (87)
- 精美网站 (58)
- qq登录界面 (90)
- nginx 命令 (82)
- nginx .http (73)
- nginx lua (70)
- nginx 重定向 (68)
- Nginx超时 (65)
- nginx 监控 (57)
- odbc (59)
- rar密码破解工具 (62)
- annotation (71)
- 红黑树 (57)
- 智力题 (62)
- php空间申请 (61)
- 按键精灵 注册码 (69)
- 软件测试报告 (59)
- ntcreatefile (64)
- 闪动文字 (56)
- guid (66)
- abap (63)
- mpeg 2 (65)
- column (63)
- dreamweaver教程 (57)
- excel行列转换 (56)
本文暂时没有评论,来添加一个吧(●'◡'●)