nginx作为反向代理服务器
nginx配置:
File Edit Options Buffers Tools Conf Help
####工作的子进程数量(通常等于CPU数量或者2倍于CPU)
worker_processes 1;
####工作模式及连接数上限
events {
worker_connections 1024;
}
####设置http服务器
http {
####文件扩展名与文件类型映射表
include mime.types;
####默认文件类型
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
####虚拟主机的配置
server {
####监听端口
listen 80;
####域名可以有多个,用空格隔开
server_name localhost;
location / {
proxy_pass http://192.168.12.70:18099;
}
####定义错误提示页面
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
nginx配置:
File Edit Options Buffers Tools Conf Help
####工作的子进程数量(通常等于CPU数量或者2倍于CPU)
worker_processes 1;
####工作模式及连接数上限
events {
worker_connections 1024;
}
####设置http服务器
http {
####文件扩展名与文件类型映射表
include mime.types;
####默认文件类型
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
####虚拟主机的配置
server {
####监听端口
listen 80;
####域名可以有多个,用空格隔开
server_name localhost;
location / {
proxy_pass http://192.168.12.70:18099;
}
####定义错误提示页面
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}