Last active
July 31, 2021 15:26
-
-
Save jack-wong-build/cabe4a2b69d3a9f97d4c5e10b9c47eb8 to your computer and use it in GitHub Desktop.
local airteaching gateway setting
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
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
# dashboard app | |
server { | |
listen 9000; | |
server_name dashboard.localhost; | |
location /api/ { | |
proxy_pass http://localhost:4333/; | |
} | |
###################################################### | |
# Airteaching Dashboard single page web app rules | |
# repo: airteaching-ui | |
###################################################### | |
# use prod file | |
# location / { | |
# root /Users/woonketwong/Documents/personal-projects/airteaching-ui/build; | |
# try_files $uri /index.html; | |
# } | |
# use local file | |
location / { | |
proxy_pass http://localhost:3100; | |
} | |
###################################################### | |
# Airteaching Dashboard static pages rules | |
# repo: airteaching-landing | |
###################################################### | |
location /login { | |
root /Users/woonketwong/Documents/personal-projects/airteaching-landing/build; | |
try_files $uri /login.html; | |
} | |
location /signup { | |
root /Users/woonketwong/Documents/personal-projects/airteaching-landing/build; | |
try_files $uri /signup.html; | |
} | |
location /reset-password { | |
root /Users/woonketwong/Documents/personal-projects/airteaching-landing/build; | |
try_files $uri /reset-password.html; | |
} | |
location ~ ^(/reset-password/confirm/[^/]+) { | |
root /Users/woonketwong/Documents/personal-projects/airteaching-landing/build; | |
try_files $uri /reset-password/confirm/[resetToken].html; | |
} | |
location /_next/ { | |
alias /Users/woonketwong/Documents/personal-projects/airteaching-landing/build/_next/; | |
} | |
location /next-fonts/ { | |
alias /Users/woonketwong/Documents/personal-projects/airteaching-landing/build/next-fonts/; | |
} | |
} | |
# landing page app | |
server { | |
listen 9000; | |
server_name www.localhost; | |
#charset koi8-r; | |
#default log is at /usr/local/var/log/nginx | |
#access_log /var/log/nginx/access.log main; | |
location /api/ { | |
proxy_pass http://localhost:4333/; | |
} | |
###################################################### | |
# Airteaching Landing static pages rules | |
# repo: airteaching-landing | |
###################################################### | |
root /Users/woonketwong/Documents/personal-projects/airteaching-landing/build; | |
error_page 404 /404.html; | |
location /pricing { | |
try_files $uri /pricing.html; | |
} | |
location ~ ^(/checkout/[^/]+) { | |
try_files $uri /checkout/[productId].html; | |
} | |
# redirect server error pages to the static page /50x.html | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment