Add nginx configuration section

This commit is contained in:
mycognosist 2020-07-08 11:02:10 +01:00
parent 82565f82df
commit bf2241fb72
4 changed files with 38 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
book
notes
src/tmp
notes

7
notes
View File

@ -1,5 +1,12 @@
notes.
29/06/2020
- todo: add styling conventions section
- code comments: Capitalized first word and period at the end.
-----
chapter_1.md
- Introduction

View File

@ -9,6 +9,7 @@
- [Software](./software/index.md)
- [Operating System](./software/operating_system/index.md)
- [Networking](./software/operating_system/networking.md)
- [Nginx](./software/operating_system/nginx.md)
- [Microservices](./software/microservices/index.md)
- [peach-buttons](./software/microservices/peach-buttons.md)
- [peach-menu](./software/microservices/peach-menu.md)

View File

@ -0,0 +1,29 @@
# Nginx Configuration
[Nginx](https://www.nginx.com/) is used as a reverse proxy for the `peach-web` application. Requests to `http://peach` and `http://www.peach` on port `80` are passed to the `peach-web` application on `http://127.0.0.1:3000`.
The configuration file for `nginx` can be found at `/etc/nginx/sites-available/peach.conf`. The contents are as follows:
```
server {
listen 80;
server_name peach www.peach;
location / {
proxy_pass http://127.0.0.1:3000;
}
}
```
## Nginx Cheatsheet
Symlink `sites-available/*.conf` to `sites-enabled/*.conf`:
`sudo ln -s /etc/nginx/sites-available/peach.conf /etc/nginx/sites-enabled/`
Check correctness of configuration:
`sudo nginx -t`
Reload nginx:
`sudo nginx -s reload`