-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e29e703
commit 76926c0
Showing
3 changed files
with
53 additions
and
4 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 |
---|---|---|
|
@@ -42,4 +42,4 @@ server { | |
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
server { | ||
listen 443 ssl; | ||
server_name localhost; | ||
|
||
# Path to SSL certificate and key | ||
ssl_certificate /etc/ssl/certs/localhost.cer; | ||
ssl_certificate_key /etc/ssl/private/localhost.key; | ||
|
||
# Root directory for the Angular app | ||
root /usr/share/nginx/html; | ||
|
||
# Default file to serve | ||
index index.html; | ||
|
||
# Serve static files from /usr/share/nginx/html | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
} | ||
|
||
# Error pages | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
|
||
# Optional: Gzip compression for improved performance | ||
gzip on; | ||
gzip_types text/plain application/javascript text/css application/json application/xml text/javascript; | ||
gzip_min_length 1024; | ||
} | ||
|
||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
# Serve static files from /usr/share/nginx/html | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
} | ||
|
||
# Error pages | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |