-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5-app_server-nginx_config
More file actions
executable file
·45 lines (36 loc) · 1.14 KB
/
Copy path5-app_server-nginx_config
File metadata and controls
executable file
·45 lines (36 loc) · 1.14 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
43
44
45
# Configures Nginx to serve the complete AirBnB_clone_v4 application.
server {
# Listen on port 80.
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
# Use server IP as domain name
server_name 100.27.4.255;
# Customize HTTP response header
add_header X-Served-By 229-web-01;
# Serve /airbnb-onepage/ route on AirBnB_clone_v2
location = /airbnb-onepage/ {
proxy_pass http://127.0.0.1:5000/airbnb-onepage/;
}
# Serve /number_odd_or_even/ route on AirBnB_clone_v2
location ~ /airbnb-dynamic/number_odd_or_even/(\d+)$ {
proxy_pass http://127.0.0.1:5001/number_odd_or_even/$1;
}
# Serve AirBnB_clone_v3 API
location /api {
proxy_pass http://127.0.0.1:5002/api;
}
# Configure /2-hbnb route of AirBnB_clone_v4 as root location
location / {
proxy_pass http://127.0.0.1:5003/2-hbnb;
}
# Serve static content for AirBnB_clone_v4
location /static {
proxy_pass http://127.0.0.1:5003;
}
# 404 error page
error_page 404 /404.html;
location /404 {
root /var/www/html;
internal;
}
}