-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.nginx
More file actions
executable file
·143 lines (125 loc) · 5.77 KB
/
dev.nginx
File metadata and controls
executable file
·143 lines (125 loc) · 5.77 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# ©AngelaMos | 2025
# Dev Nginx Proxy Config
server {
listen 80;
server_name localhost 192.168.1.167 certgames.com www.certgames.com;
location /api/socket.io/ {
proxy_http_version 1.1;
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;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://backend:5000/api/socket.io/;
proxy_buffering off;
proxy_cache off;
proxy_redirect off;
proxy_read_timeout 86400; # 24 hours
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
}
location /api/ {
proxy_pass http://backend:5000/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Prefix /api;
# Streaming support for Ollama AI responses
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
# Allow 10MB file uploads for certification images/PDFs
client_max_body_size 10M;
}
location = /mentorship {
proxy_pass http://user_frontend:3000;
proxy_http_version 1.1;
proxy_set_header Accept-Encoding "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
sub_filter_once off;
sub_filter '<title>CertGames - Gamified Cybersecurity Training & Certifications</title>' '<title>1-on-1 Cybersecurity Mentorship - CertGames</title>';
sub_filter 'content="CertGames - Gamified Certification Training"' 'content="1-on-1 Cybersecurity Mentorship - CertGames"';
sub_filter 'content="Level up your cybersecurity skills with CertGames. Practice for CompTIA, ISC2, Cisco and AWS certifications with 18,000+ questions in a gamified learning environment."' 'content="30-day cybersecurity mentorship. Personalized roadmap, weekly calls, resume fix, GitHub projects, and interview training. Limited spots."';
sub_filter 'content="Level up your cybersecurity skills with gamified certification training. 18,000+ questions for CompTIA, Cisco, ISC2, AWS exams."' 'content="30-day cybersecurity mentorship. Personalized roadmap, weekly calls, resume fix, GitHub projects, and interview training. Limited spots."';
sub_filter 'content="Level up your cybersecurity skills with gamified certification training."' 'content="30-day cybersecurity mentorship. Personalized roadmap, weekly calls, and interview training."';
sub_filter 'certgames-social.png' 'mentorship-social.png';
sub_filter 'content="https://certgames.com/"' 'content="https://certgames.com/mentorship"';
sub_filter 'href="https://certgames.com/"' 'href="https://certgames.com/mentorship"';
}
location / {
proxy_pass http://user_frontend:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
}
}
server {
listen 8080;
server_name _;
location /cracked/ {
proxy_pass http://backend:5000/cracked/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /api/socket.io/ {
proxy_http_version 1.1;
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;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://backend:5000/api/socket.io/;
proxy_buffering off;
proxy_cache off;
proxy_redirect off;
proxy_read_timeout 86400; # 24 hours
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
}
location /api/ {
proxy_pass http://backend:5000/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Prefix /api;
# Streaming support for Ollama AI responses
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
# Allow 10MB file uploads for certification images/PDFs
client_max_body_size 10M;
}
location / {
proxy_pass http://admin_frontend:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
}
}