-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5-app_server-nginx_config
More file actions
48 lines (39 loc) · 1.31 KB
/
5-app_server-nginx_config
File metadata and controls
48 lines (39 loc) · 1.31 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
46
47
48
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
add_header X-Served-By $hostname;
server_name _;
location /static {
alias /home/ubuntu/AirBnB_clone_v4/web_dynamic/static/;
}
location /api/ {
proxy_pass http://0.0.0.0:5002/api/;
}
location /airbnb-onepage/ {
proxy_pass http://0.0.0.0:5000/airbnb-onepage/;
}
location /airbnb-dynamic/number_odd_or_even/(\d+)$ {
proxy_pass http://0.0.0.0:5001/number_odd_or_even/$1;
}
location /hbnb_static {
alias /data/web_static/current/;
autoindex on;
}
location /web_dynamic/static/ {
alias /home/ubuntu/AirBnB_clone_v4/web_dynamic/static;
}
location / {
proxy_pass http://0.0.0.0:5003/2-hbnb/;
}
error_page 404 /404.html;
location /404.html {
root /var/www/html;
internal;
}
if ($request_filename ~ redirect_me){
rewrite ^ https://www.youtube.com/watch?v=QH2-TGUlwu4 permanent;
}
}