-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve nginx.conf, change compose port
- Loading branch information
Showing
2 changed files
with
36 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,42 @@ | ||
include /etc/nginx/mime.types; | ||
worker_processes 1; | ||
|
||
server { | ||
# ipv4 | ||
listen 443 ssl; | ||
# ipv6 | ||
listen [::]:443 ssl; | ||
server_name ${gh_user}.github.io/${repo_subdir}; | ||
events { | ||
worker_events 1024; | ||
} | ||
|
||
types { | ||
application/wasm wasm; | ||
} | ||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
sendfile on; | ||
keepalive_timeout 65; | ||
gzip on; | ||
|
||
# yew-rs frontend | ||
location / { | ||
server { | ||
# | ||
listen 443 ssl; # ipv4 | ||
listen [::]:443 ssl; # ipv6 | ||
server_name ${gh_user}.github.io/${repo_name}; | ||
# | ||
# yew-rs frontend | ||
root ./client/dist/index.html; | ||
try_files $uri $uri/ ./client/index.html; | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
} | ||
# SpringBoot backend | ||
location /api { | ||
proxy_pass http://localhost:8080; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $http_host; | ||
location / { | ||
proxy_pass http:// | ||
try_files $uri $uri/ ./client/index.html; | ||
include /etc/nginx/mime.types; | ||
types { | ||
application/wasm wasm; | ||
} | ||
|
||
default_type application/octet-stream; | ||
} | ||
# | ||
# SpringBoot backend | ||
location /api { | ||
proxy_pass http://localhost:8080; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $http_host; | ||
|
||
} | ||
} | ||
} |