初学Nginx(一)监听两个端口,实现转发
来源:互联网 发布:ubuntu u盘挂载 编辑:程序博客网 时间:2024/06/08 07:52
#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;
location / {
proxy_pass http://www.baidu.com;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 8023;
server_name localhost;
location / {
proxy_pass https://user.qzone.qq.com/398902904/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
# 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;
# }
#}
}
阅读全文
0 0
- 初学Nginx(一)监听两个端口,实现转发
- nginx监听一个端口多域名转发配置
- nginx 同时监听uwsgi服务器两个端口,实现一个服务器运行多个项目
- nginx端口转发
- nginx 配置端口转发
- Nginx监听端口管理
- nginx监听端口非80时的转发问题的配置文件
- nginx 端口转发跳转问题
- 【097】Nginx实现一台服务器,两个域名发布不同的前端项目,并且两个域名都用80端口。
- iptables 实现端口转发
- Linux实现端口转发
- iptables 实现端口转发
- 使用Nginx(OpenResty)转发域名到非80端口
- NGINX 一台服务器,两个网址同时使用80端口
- nginx实现请求转发
- nginx实现请求转发
- nginx实现请求转发
- nginx实现二级域名转发
- GET请求jsonp示例
- [简单逻辑学]学习逻辑学的思想准备——真相
- ubuntu下安装arm-linux-gcc交叉编译环境
- JSP中的pagaEncoding和contentType中charset的区别
- Vue2+VueRouter2+Webpack+Axios 构建项目实战2017重制版(五)配置 Axios api 接口调用文件
- 初学Nginx(一)监听两个端口,实现转发
- Median [二分]
- 考研数据结构复习之线性表
- 常见的几种RuntimeException
- Oracle exp/imp导入不同的表空间
- java 数据结构与排序
- .net多线程学习
- Socket编程中select函数用法详解(转)
- charles(windows64位) 抓包工具安装及详解