-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3-app_server-nginx_config
More file actions
43 lines (34 loc) · 1 KB
/
3-app_server-nginx_config
File metadata and controls
43 lines (34 loc) · 1 KB
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
server {
listen 80 default_server;
listen [::]:80 default_server;
#use server IP as domain name
server_name 54.161.238.31
# add header for HAproxy
add_header X-Served-By 395583-web-01;
root /var/www/html;
index index.html index.htm;
#Serve /airbnb-onepage/ route on Airbnb_clone_v2
location = /airbnb-onepage/ {
include proxy_params;
proxy_pass http://127.0.0.1:5000/airbnb-onepage/;
}
#Serve /airbnb-dynamic/number_odd_or_even/(\d+)$ route on Airbnb_clone_v2
location ~ /airbnb-dynamic/number_odd_or_even/(\d+)$ {
include proxy_params;
proxy_pass http://127.0.0.1:5001/number_odd_or_even/$1;
}
# Serve Static content
location /hbnb_static {
alias /data/web_static/current;
index index.html index.htm;
}
# Add redirect
location /redirect_me {
return 301 https://github.com/patrice012/;
}
error_page 404 /404.html;
location /404 {
root /var/www/html;
internal;
}
}