Created
September 10, 2020 12:51
-
-
Save teru01/47dcc923c5a7cfabf35ee55d12ebf286 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes auto; | |
error_log error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 4096; ## Default: 1024 | |
} | |
http { | |
client_body_buffer_size 5M; | |
include /etc/nginx/mime.types; | |
# include /etc/nginx/proxy.conf; | |
# include /etc/nginx/fastcgi.conf; | |
index index.html index.htm index.php; | |
default_type application/octet-stream; | |
log_format with_time '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" $request_time'; | |
access_log access.log with_time; | |
sendfile on; | |
tcp_nopush on; | |
server { # simple reverse-proxy | |
listen 8000; | |
# server_name domain2.com www.domain2.com; | |
# access_log logs/domain2.access.log main; | |
# serve static files | |
location ~ ^/(upload|static)/ { | |
root ../webapp/public; # /upload/aaazzz.pngにアクセスで/var/www/upload/aaazzz.pngを取得 | |
} | |
# pass requests for dynamic content to rails/turbogears/zope, et al | |
location / { | |
proxy_pass http://127.0.0.1:8888; | |
} | |
} | |
# upstream big_server_com { | |
# server 127.0.0.3:8000 weight=5; | |
# server 127.0.0.3:8001 weight=5; | |
# server 192.168.0.1:8000; | |
# server 192.168.0.1:8001; | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment