-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
45 lines (33 loc) · 1.33 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# the events block is required
events{}
http {
# include the default mime.types to map file extensions to MIME types
include /etc/nginx/mime.types;
server {
listen 443 ssl default_server;
listen [::]:443 ssl;
# set the root directory for the server (we need to copy our
# application files here)
root /usr/share/nginx/html;
# set the default index file for the server (Angular generates the
# index.html file for us and it will be in the above directory)
index index.html;
server_name plesk.mike-westermann.de;
ssl_certificate /etc/nginx/ssl/certificate.pem;
ssl_certificate_key /etc/nginx/ssl/key.pem;
# specify the configuration for the '/' location
location / {
# try to serve the requested URI. if that fails then try to
# serve the URI with a trailing slash. if that fails, then
# serve the index.html file; this is needed in order to serve
# Angular routes--e.g.,'localhost:8080/customer' will serve
# the index.html file
try_files $uri $uri/ /index.html;
}
}
server {
listen 80 default_server;
server_name plesk.mike-westermann.de;
return 301 https://plesk.mike-westermann.de:444$request_uri;
}
}