diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..eea8857 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,38 @@ +worker_processes auto; +include /etc/nginx/modules-enabled/*.conf; + +events { + worker_connections 768; + # multi_accept on; +} + +http { + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + error_log stderr; + access_log /dev/stdout; + include /etc/nginx/mime.types; + default_type application/octet-stream; + types_hash_max_size 2048; + types_hash_bucket_size 128; + gzip on; + +server { + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, DELETE, OPTIONS'; + listen 8008; + location /admin { + root /home/ilya/git/contact_mailer/adminer; + index index.html; + } + location / { + root /home/ilya/git/contact_mailer; + index test.html; + } + location /api/ { + proxy_pass http://localhost:8080/; + } +} +}