Mise à jour de 'Setup'

philc 2023-04-06 08:26:54 +00:00
parent e1a05c7fb6
commit 632c8aae04

@ -67,30 +67,46 @@ Create a safe user (with sudo access) in this example phil
# OPTION if needed Allow a simple user to listen on port 80 on this machine
sudo setcap cap_net_bind_service=+ep /usr/local/bin/node
```
**install nginx**
```
sudo apt install nginx
#usefull command, you do not need it all back stuff will be under apxtrib.js control.
sudo systemctl (start|stop|reload|restart|status) nginx
#just check all is fine
sudo systemctl status nginx
```
FYI: A specific data/nginx/nginx.conf file will be generate after the 1st install apixpress to make it works as http.
**install apixpress**
**install nginx and apixpress**
FYI: dev will work without ssl, in production server nginx will manage ssl as a reverse proxy by using certbot let'sEncrypt certs.
```
sudo apt install nginx
#usefull command, you do not need it all back stuff will be under apxtrib.js control.
sudo systemctl (start|stop|reload|restart|status) nginx
#just check all is fine
sudo systemctl status nginx
git config --global credential.helper store
mkdir ~/workspace
cd workspace
git clone https://gitea.ndda.fr/apxtrib/apxtrib.git
cd apxtrib
yarn install
#edit nginx.conf
vim /etc/nginx.conf
#change user nginx by phil (your root user)
user nginx; by user phil;
#edit nginx default config
vim /etc/nginx/conf.d/default.conf
#change section location
location / {
root /usr/share/nginx/html; # change here by : root /home/phil/workspace/nationchains/www/socialworld
index index.html index.htm;
}
# save
sudo systemctl restart nginx
# Start apxtrib
yarn setup
```
**if you run for the 1st time then you need to set properly /setup/configsetup.json**
Open your browser and type in the url http://localhost/setup.html
```
{
"sudoerUser": "phil - your sudoer user that will run nginx and apxtrib",