NTNU Course Queuing Website / 師大課程排隊網站
Tutorial of network management (Reverse proxy)
I used Apache at the beginning, but it is extremely slow.
Then I tried Nginx, but it seems like containing a lot of bugs on Windows, it is not friendly...
In the end, I tried Caddy... And I found that it is super fast and easy to configure. Amazing!
- 
Apply for certificates to change HTTP to HTTPS - 
You can use Certbot of Let's Encrypt to generate your certificates. There are plenty tutorials on the Internet, I list the best one for me at here only: 
- 
Move the certificates that you generated by Certbot into directory Proxy.
 
- 
- 
Buy a domain I bought one on NameCheap with about 2 USD (about 60 TWD), which is "ntnu.site". 
- 
Caddy (Reverse proxy) - 
Download Caddy. 
- 
You can choose to add its path into environment variables, or put the whole directory here. I'm not going to explain this in detail because it is tedious and a little complicated. Here's a tutorial for you guys: https://wst24365888.github.io/install-caddy/ 
- 
Rename Caddyfile_examplein directoryProxytoCaddyfile.
- 
Open it and do some changes: - 
Change "YOUR_DOMAIN" in line 1 to your domain. 
- 
Change "FULL_CHAIN.PEM" in line 3 to your full chain certificate filename. Default should be "fullchain1.pem". 
- 
Change "PRIVATE_KEY.PEM" in line 3 to your private key certificate filename. Default should be "privkey1.pem". 
- 
Change "BACK_END_URL" to your Back-End URL. Most of the people setup Back-End on the same computer with reverse proxy, then the Back-End URL should be "127.0.0.1". 
- 
Do same thing to "FRONT_END_URL" 
- 
Change "BACK_END_PORT" to your Back-End port. Default should be 5000. 
- 
Change "FRONT_END_PORT" to your Front-End port. Default should be 3000. 
 
- 
- 
Run the Caddy with command caddy runorcaddy start.
 
- 

