up
This commit is contained in:
parent
e88741331b
commit
51c9457a58
1 changed files with 14 additions and 17 deletions
31
README.md
31
README.md
|
@ -149,7 +149,7 @@ Commit a casa di cek [[commit 89019f168c](https://git.lattuga.net/RuscoMap/rusco
|
||||||
|
|
||||||
## Installazione dipendenze
|
## Installazione dipendenze
|
||||||
|
|
||||||
#### Installa mariadb e jq
|
#### Installa mariadb, jq e npm
|
||||||
<code>sudo apt update && sudo apt install mariadb jq npm</code>
|
<code>sudo apt update && sudo apt install mariadb jq npm</code>
|
||||||
|
|
||||||
#### Clona il git
|
#### Clona il git
|
||||||
|
@ -189,7 +189,7 @@ mysql < initDb.sql
|
||||||
<code>nano /var/www/html/leaflet/ruscomap/server/config/default.json</code>
|
<code>nano /var/www/html/leaflet/ruscomap/server/config/default.json</code>
|
||||||
|
|
||||||
#### Apri porta sul firewall
|
#### Apri porta sul firewall
|
||||||
<code>sudo iptables -A INPUT -p tcp --dport 3232 -j ACCEPT</code>
|
<code>sudo iptables -A INPUT -p tcp --dport 3000 -j ACCEPT</code>
|
||||||
|
|
||||||
#### Cre l'utente
|
#### Cre l'utente
|
||||||
sudo adduser ruscone
|
sudo adduser ruscone
|
||||||
|
@ -241,19 +241,18 @@ sudo systemctl status ruscomap.service
|
||||||
#PORT 80
|
#PORT 80
|
||||||
<VirtualHost ruscomap.myserver:80>
|
<VirtualHost ruscomap.myserver:80>
|
||||||
|
|
||||||
DocumentRoot /var/www/html/leaflet/ruscomap/public
|
|
||||||
ServerName ruscomap.myserver
|
ServerName ruscomap.myserver
|
||||||
|
DocumentRoot /var/www/html/leaflet/ruscomap/public
|
||||||
|
|
||||||
ProxyPass / http://localhost:3232/
|
ProxyPass / http://127.0.0.1:3000/
|
||||||
ProxyPassReverse / http://localhost:3232/
|
ProxyPassReverse / http://127.0.0.0.1:3000/
|
||||||
|
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
RewriteCond %{HTTP:Upgrade} =websocket
|
#RewriteCond %{HTTP:Upgrade} =websocket
|
||||||
RewriteRule /(.*) ws://localhost:3232/$1 [P,L]
|
#RewriteRule /(.*) ws://localhost:3000/$1 [P,L]
|
||||||
|
|
||||||
RewriteCond %{SERVER_NAME} =ruscomap.myserver
|
RewriteCond %{SERVER_NAME} =ruscomap.myserver
|
||||||
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
||||||
</VirtualHost>
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -276,34 +275,32 @@ RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
#443
|
#443
|
||||||
<VirtualHost _default_:443>
|
|
||||||
|
|
||||||
DocumentRoot /var/www/html/leaflet/ruscomap/public
|
DocumentRoot /var/www/html/leaflet/ruscomap/public
|
||||||
ServerName ruscomap.myserver
|
ServerName ruscomap.myserver
|
||||||
|
|
||||||
Protocols h2 http/2
|
#Protocols h2 http/2
|
||||||
|
|
||||||
ProxyPass / http://localhost:3000/
|
ProxyPass / http://localhost:3000/
|
||||||
ProxyPassReverse / http://localhost:3000/
|
ProxyPassReverse / http://localhost:3000/
|
||||||
|
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
RewriteCond %{HTTP:Upgrade} =websocket
|
#RewriteCond %{HTTP:Upgrade} =websocket
|
||||||
RewriteRule /(.*) ws://localhost:3000/$1 [P,L]
|
#RewriteRule /(.*) ws://localhost:3000/$1 [P,L]
|
||||||
|
|
||||||
LogFormat "%t %h \"%r\" %>s \"%{User-Agent}i\"" custom
|
LogFormat "%t %h \"%r\" %>s \"%{User-Agent}i\"" custom
|
||||||
|
|
||||||
ErrorLog ${APACHE_LOG_DIR}/ruscomap.log
|
ErrorLog ${APACHE_LOG_DIR}/ruscomap.log
|
||||||
CustomLog ${APACHE_LOG_DIR}/ruscomap-access.log custom
|
CustomLog ${APACHE_LOG_DIR}/ruscomap-access.log custom
|
||||||
|
|
||||||
|
SSLEngine on
|
||||||
SSLCertificateFile /etc/letsencrypt/live/ruscomap.myserver/fullchain.pem
|
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
|
# HSTS una settimana 604800, per settare un anno: max-age=31536000
|
||||||
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
|
#Header always set Strict-Transport-Security "max-age=1,; includeSubDomain>
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
##### restarta apache
|
##### restarta apache
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue