From 632c8aae04ba18b30257e681698d1436fd350f75 Mon Sep 17 00:00:00 2001 From: philc Date: Thu, 6 Apr 2023 08:26:54 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Setup'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Setup.md | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/Setup.md b/Setup.md index fc6eb0f..242b761 100644 --- a/Setup.md +++ b/Setup.md @@ -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. ``` - git config --global credential.helper store - mkdir ~/workspace - cd workspace - git clone https://gitea.ndda.fr/apxtrib/apxtrib.git - cd apxtrib - yarn install + 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",