-
Notifications
You must be signed in to change notification settings - Fork 3
/
app.conf
46 lines (34 loc) · 1.28 KB
/
app.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
46
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www;
#add_header X-Frame-Options "SAMEORIGIN";
#add_header X-Content-Type-Options "nosniff";
index index.html;
charset utf-8;
# _ makes sure that nginx does not try to map requests to a specific hostname
# This allows us to specify the urls to our application as infrastructure changes,
# without needing to change the application
server_name _;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
# Some static assets are loaded on every page load,
# and logging these turns into a lot of useless logs.
# If you would prefer to see these requests for catching 404's etc.
# Feel free to remove them
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
# When a 404 is returned, we want to display our applications 404 page,
# so we redirect it to index.php to load the correct page
error_page 404 /index.php;
location / {
add_header Access-Control-Allow-Origin *;
try_files $uri /index.html;
}
location ~ /\.ht {
deny all;
}
location ~ /\.(?!well-known).* {
deny all;
}
}