worker_processes 2;
events {
worker_connections 1024;
}
http {
server_tokens off;
include mime.types;
default_type application/octet-stream;
charset utf-8;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 300m;
tcp_nopush on;
tcp_nodelay on;
client_body_buffer_size 512k;
proxy_connect_timeout 300s;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
proxy_buffer_size 64k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 128k;
proxy_ignore_client_abort on;
gzip on;
gzip_http_version 1.1;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_comp_level 2;
gzip_vary on;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
upstream apm {
server 192.168.199.157:8081;
}
server {
listen 8080;
server_name 192.168.199.176;
charset utf-8;
location /springmvc/ {
proxy_pass http://apm;
}
}
sendfile on;
keepalive_timeout 65;
}
192.168.199.176:8080/springmvc/にアクセスすると、192.168.199.157:8081/springmvcのホームページにアクセスできました