me / nginx.conf
BinaryONe
InitialCommit -Modification in Dockerfile
0921002
user app_user;
worker_processes auto;
error_log stderr notice;
pid /tmp/nginx.nid;
#error_log /tmp/error.log;
# run nginx in foreground
#daemon off;
events {
worker_connections 10;
}
http {
client_body_temp_path /tmp/client_body;
fastcgi_temp_path /tmp/fastcgi_temp;
proxy_temp_path /tmp/proxy_temp;
scgi_temp_path /tmp/scgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
#error_log /tmp/error.log;
access_log /dev/stdout;
server_tokens on;
include /etc/nginx/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"';
log_format compact '$remote_addr - $time_local - "$request" - $status';
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
#access_log off;
# disable to avoid caching and volume mount issues
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
server {
listen 7860;
server_name 0.0.0.0;
location / {
root /var/www/portfolio;
index index.html;
try_files $uri /index.html;
}
location /api/ {
proxy_pass http://127.0.0.1:8000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}