This commit is contained in:
2023-07-27 12:37:24 -07:00
parent 0111a25e69
commit 9717fcb3bf
37 changed files with 425 additions and 43 deletions

View File

@ -1,4 +1,8 @@
---
status: "4-Done"
created: "2023-06-08T20:40:12.528Z"
updated: "2023-07-27T18:05:52.745Z"
type: "kanbn"
---
# setup-nginx
@ -6,6 +10,7 @@
```bash
echo >/etc/nginx/sites-available/default && nano /etc/nginx/sites-available/default
```
```conf
server {
listen 80 default_server;
@ -18,6 +23,7 @@ server {
}
}
```
```bash
systemctl restart nginx
lsof -i -P -n | grep LISTEN
@ -26,6 +32,7 @@ nginx -t
nginx -s reload
echo >/etc/nginx/sites-available/Barcode-Host-Server && nano /etc/nginx/sites-available/Barcode-Host-Server
```
```conf
server {
listen 80 default_server;
@ -38,9 +45,11 @@ server {
}
}
```
```bash
echo >/home/unity4/localhost.conf && nano /home/unity4/localhost.conf
```
```conf
[req]
default_bits = 2048
@ -75,11 +84,13 @@ DNS.1 = unity4
DNS.2 = localhost
DNS.3 = 127.0.0.1
```
```bash
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/localhost.key -out /etc/nginx/localhost.crt -config /home/unity4/localhost.conf
ls /etc/nginx
echo >/etc/nginx/sites-available/Barcode-Host-Server && nano /etc/nginx/sites-available/Barcode-Host-Server
```
```conf
server {
server_name _;
@ -99,6 +110,7 @@ server {
}
}
```
```bash
ln -s /etc/nginx/sites-available/Barcode-Host-Server /etc/nginx/sites-enabled/Barcode-Host-Server
nginx -t
@ -106,6 +118,7 @@ nginx -s reload
links https://localhost/api/lastscan
links https://unity4/api/lastscan
```
```conf
# C:\Windows\System32\drivers\etc\hosts
192.168.0.204 unity4