forked from edisonmora95/ppl_app_lab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathppl.nginx
More file actions
executable file
·70 lines (59 loc) · 1.65 KB
/
ppl.nginx
File metadata and controls
executable file
·70 lines (59 loc) · 1.65 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
upstream nodejs {
server localhost:8000;
}
#http://blog.argteam.com/coding/hardening-node-js-for-production-part-2-using-nginx-to-avoid-node-js-load/
#https://www.nginx.com/resources/admin-guide/serving-static-content/
#https://www.nginx.com/resources/wiki/start/topics/tutorials/install/
#https://www.linode.com/docs/web-servers/nginx/how-to-configure-nginx/
server {
listen 80;
include /etc/nginx/mime.types;
#server_name localhost;
root /home/joelerll/pasantias/espol-ppl;
location ~ ^/(bower_components/|js/|img/|css/) {
root /home/joelerll/pasantias/espol-ppl/public;
access_log off;
expires max;
}
location ~ ^/(scripts/) {
access_log off;
expires max;
}
# estudiantes single page
location ~ ^/(app_client/estudiantes/dist/) {
access_log off;
expires max;
}
# estudiantes perfil
location ~ ^/(app_client/estudiantes/perfil/) {
access_log off;
expires max;
}
# estudiantes tomar leccion
location ~ ^/(app_client/estudiantes/tomar-leccion/) {
access_log off;
expires max;
}
#estudiante leccion
location ~ ^/(app_client/estudiantes/leccion/) {
access_log off;
expires max;
}
location ~* \.(ico)$ {
expires 168h;
}
location / {
proxy_redirect off;
proxy_http_version 1.1;
proxy_pass http://nodejs;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host ;
#proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location api/ {
expires max;
}
}