-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Dockerfile and nginx.conf for nginx deployment
- Loading branch information
1 parent
153f752
commit b9eb23d
Showing
2 changed files
with
56 additions
and
38 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,57 @@ | ||
user nginx; | ||
worker_processes 1; | ||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
|
||
# SSL configuration | ||
# | ||
# listen 443 ssl default_server; | ||
# listen [::]:443 ssl default_server; | ||
# | ||
# Note: You should disable gzip for SSL traffic. | ||
# See: https://bugs.debian.org/773332 | ||
# | ||
# Read up on ssl_ciphers to ensure a secure configuration. | ||
# See: https://bugs.debian.org/765782 | ||
# | ||
# Self signed certs generated by the ssl-cert package | ||
# Don't use them in a production server! | ||
# | ||
# include snippets/snakeoil.conf; | ||
|
||
root /var/www/html; | ||
|
||
# Add index.php to the list if you are using PHP | ||
index index.html index.htm index.nginx-debian.html; | ||
|
||
server_name _; | ||
|
||
error_log /var/log/nginx/error.log warn; | ||
pid /var/run/nginx.pid; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
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"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
sendfile on; | ||
#tcp_nopush on; | ||
|
||
keepalive_timeout 65; | ||
|
||
gzip on; | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
root /usr/share/nginx/html; | ||
|
||
# To make sure any assets can get through :) | ||
location / { | ||
try_files $uri /index.html; | ||
# First attempt to serve request as file, then | ||
# as directory, then fall back to displaying a 404. | ||
try_files $uri /index.html; | ||
# proxy_pass http://localhost:8080; | ||
# proxy_http_version 1.1; | ||
# proxy_set_header Upgrade $http_upgrade; | ||
# proxy_set_header Connection 'upgrade'; | ||
# proxy_set_header Host $host; | ||
# proxy_cache_bypass $http_upgrade; | ||
} | ||
|
||
location @rewrites { | ||
rewrite ^(.+)$ /index.html last; | ||
} | ||
} | ||
} | ||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | ||
# | ||
#location ~ \.php$ { | ||
# include snippets/fastcgi-php.conf; | ||
# | ||
# # With php7.0-cgi alone: | ||
# fastcgi_pass 127.0.0.1:9000; | ||
# # With php7.0-fpm: | ||
# fastcgi_pass unix:/run/php/php7.0-fpm.sock; | ||
#} | ||
|
||
# deny access to .htaccess files, if Apache's document root | ||
# concurs with nginx's one | ||
# | ||
#location ~ /\.ht { | ||
# deny all; | ||
#} | ||
} |