From 51c9457a58936c1d84e979718a8552e441ddd7f2 Mon Sep 17 00:00:00 2001 From: scossa Date: Sun, 24 Nov 2024 14:43:46 +0100 Subject: [PATCH] up --- README.md | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 733e6e5..6b7664d 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ Commit a casa di cek [[commit 89019f168c](https://git.lattuga.net/RuscoMap/rusco ## Installazione dipendenze -#### Installa mariadb e jq +#### Installa mariadb, jq e npm sudo apt update && sudo apt install mariadb jq npm #### Clona il git @@ -189,7 +189,7 @@ mysql < initDb.sql nano /var/www/html/leaflet/ruscomap/server/config/default.json #### Apri porta sul firewall -sudo iptables -A INPUT -p tcp --dport 3232 -j ACCEPT +sudo iptables -A INPUT -p tcp --dport 3000 -j ACCEPT #### Cre l'utente sudo adduser ruscone @@ -241,19 +241,18 @@ sudo systemctl status ruscomap.service #PORT 80 -DocumentRoot /var/www/html/leaflet/ruscomap/public ServerName ruscomap.myserver +DocumentRoot /var/www/html/leaflet/ruscomap/public -ProxyPass / http://localhost:3232/ -ProxyPassReverse / http://localhost:3232/ +ProxyPass / http://127.0.0.1:3000/ +ProxyPassReverse / http://127.0.0.0.1:3000/ RewriteEngine on -RewriteCond %{HTTP:Upgrade} =websocket -RewriteRule /(.*) ws://localhost:3232/$1 [P,L] +#RewriteCond %{HTTP:Upgrade} =websocket +#RewriteRule /(.*) ws://localhost:3000/$1 [P,L] RewriteCond %{SERVER_NAME} =ruscomap.myserver RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] - ``` @@ -276,34 +275,32 @@ RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] #443 - - DocumentRoot /var/www/html/leaflet/ruscomap/public ServerName ruscomap.myserver -Protocols h2 http/2 +#Protocols h2 http/2 ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ RewriteEngine on -RewriteCond %{HTTP:Upgrade} =websocket -RewriteRule /(.*) ws://localhost:3000/$1 [P,L] +#RewriteCond %{HTTP:Upgrade} =websocket +#RewriteRule /(.*) ws://localhost:3000/$1 [P,L] LogFormat "%t %h \"%r\" %>s \"%{User-Agent}i\"" custom ErrorLog ${APACHE_LOG_DIR}/ruscomap.log CustomLog ${APACHE_LOG_DIR}/ruscomap-access.log custom +SSLEngine on SSLCertificateFile /etc/letsencrypt/live/ruscomap.myserver/fullchain.pem -SSLCertificateKeyFile /etc/letsencrypt/live/ruscomap.myserver/privkey.pem +SSLCertificateKeyFile /etc/letsencrypt/live/ruscomap.amyserver/privkey.pem -# HSTS una settimana, per settare un anno: max-age=31536000 -Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains" +# HSTS una settimana 604800, per settare un anno: max-age=31536000 +#Header always set Strict-Transport-Security "max-age=1,; includeSubDomain> - ``` ##### restarta apache ```