I install wifi-pages with ansible and have blank page.
I tried the script to correct permissions and it doesn't change.
I opened port 3030 in OUTPUT and INPUT and I have error 502.
I also tried not putting rules in iptables...idem.
[INFO 2022-05-22 01:00:37:037] Server started on port 3030
::::::::::::::
log/info.log
::::::::::::::
[INFO 2022-05-22 01:00:37:037] Server started on port 3030
::::::::::::::
log/nginx.access.log
::::::::::::::
5.91.110.179 - - [22/May/2022:01:00:21 +0200] "GET / HTTP/2.0" 502 552 "-"
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64
Safari/537.36"
5.91.110.179 - - [22/May/2022:01:00:21 +0200] "GET /robots.txt HTTP/2.0" 502 552 "-"
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64
Safari/537.36"
5.91.110.179 - - [22/May/2022:01:00:21 +0200] "GET /favicon.ico HTTP/2.0" 502
552"https://wifi.nnxx.ninux.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/101.0.4951.64 Safari/537.36"
5.91.110.179 - - [22/May/2022:01:00:21 +0200] "GET /favicon.ico HTTP/2.0" 502
552"https://wifi.nnxx.ninux.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/101.0.4951.64 Safari/537.36"
5.91.110.179 - - [22/May/2022:01:00:22 +0200] "GET /favicon.ico HTTP/2.0" 502
552"https://wifi.nnxx.ninux.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/101.0.4951.64 Safari/537.36"
::::::::::::::
log/nginx.error.log
::::::::::::::
2022/05/22 01:00:21 [error] 1914#1914: *18 connect() failed (111: Connection refused) while connecting
to upstream, client: 5.91.110.179, server: wifi.nnxx.ninux.org, request: "GET / HTTP/2.0",
upstream:"http://127.0.0.1:3030/", host: "wifi.nn
xx.ninux.org"
2022/05/22 01:00:21 [error] 1914#1914: *18 connect() failed (111: Connection refused) while connecting to
upstream, client: 5.91.110.179, server: wifi.nnxx.ninux.org, request: "GET /robots.txt HTTP/2.0",
upstream:"http://127.0.0.1:3030/robots. txt", host: "wifi.nnxx.ninux.org"
2022/05/22 01:00:21 [error] 1914#1914: *18 connect() failed (111: Connection refused) while connecting to upstream,
client: 5.91.110.179, server: wifi.nnxx.ninux.org, request: "GET /favicon.ico HTTP/2.0",
upstream:"http://127.0.0.1:3030/favico n.ico", host: "wifi.nnxx.ninux.org",
referrer:"https://wifi.nnxx.ninux.org/"
2022/05/22 01:00:21 [error] 1914#1914: *18 connect() failed (111: Connection refused) while connecting to upstream,
client: 5.91.110.179, server: wifi.nnxx.ninux.org, request: "GET /favicon.ico HTTP/2.0",
upstream:"http://127.0.0.1:3030/favico n.ico", host: "wifi.nnxx.ninux.org",
referrer:"https://wifi.nnxx.ninux.org/"
2022/05/22 01:00:22 [error] 1914#1914: *18 connect() failed (111: Connection refused) while connecting to upstream,
client: 5.91.110.179, server: wifi.nnxx.ninux.org, request: "GET /favicon.ico HTTP/2.0",
upstream:"http://127.0.0.1:3030/favico n.ico", host: "wifi.nnxx.ninux.org",
referrer:"https://wifi.nnxx.ninux.org/"
::::::::::::::
log/server.log
::::::::::::::
yarn run v1.22.19
$ node config/setup.js && node config/build-translations.js
Done in 54.13s.
[INFO 2022-05-22 01:00:37:037] Server started on port 3030
::::::::::::::
log/warn.log
::::::::::::::
My playbok is:
- hosts: CaptivePortal
become: "{{ become | default('yes') }}"
roles:
- geerlingguy.certbot
- openwisp-wifi-login-pages
vars:
# Captive Portal
wifi_login_pages_domains: ["wifi.nnxx.ninux.org"]
wifi_login_pages_ssl_cert: "/etc/letsencrypt/live/{{ inventory_hostname
}}/fullchain.pem"
wifi_login_pages_ssl_key: "/etc/letsencrypt/live/{{ inventory_hostname
}}/privkey.pem"
# certbot configuration
certbot_auto_renew_minute: "20"
certbot_auto_renew_hour: "5"
certbot_create_if_missing: true
certbot_auto_renew_user: "root"
certbot_certs:
- email:"[email protected]"
domains:
- "{{ inventory_hostname }}"
and files:
michele@mikytux:/git/new-server$ ls files/owlp_
owlp_i18n/ owlp_organizations/
michele@mikytux:/git/new-server$ ls files/owlp_*
files/owlp_i18n:
de.po en.po fur.po it.po ru.po sl.po
files/owlp_organizations:
default js
Il 16/05/22 14:00, Federico Capoano ha scritto:
Permission denied indicates a linux permission issue, do not change
things manually, use the playbook:
https://github.com/openwisp/ansible-openwisp-wifi-login-pages
Or alternatively, I use this script to rebuild after changes if I need
to operate manually without the ansible playbook:
#!/bin/bash
set -e
yarn
# everything owned by www-data
chown -R www-data:www-data .
# remove any world permission
chmod -R o-rwx .
sudo -u www-data yarn build --mode production
supervisorctl restart wifi_login_pages
Set this in the same directory of the WiFI login pages app.
Best regards
Federico Capoano
On Sun, May 15, 2022 at 6:45 AM Michele Salerno <[email protected]>
wrote:
Hi,
In a new installation I have the blank page.
I copy default organization ed i modify only this vars:
---
name: "Basilicata"
slug: "default"
settings:
mobile_phone_verification: false
subscriptions: false
# configuration variables for the server app
server:
# put the URL of openwisp-radius here
host: "http://127.0.0.1:8000"
uuid: "UID-OF-MY-ORG"
secret_key: "TOKEN-MY-ORG-RADIUS-SETTINGS"
I looked in the logs and: cat
/opt/openwisp2/wifi-login-pages/log/server.log
yarn run v1.22.19
$ node config/setup.js && node config/build-translations.js
node:internal/fs/utils:345
throw err;
^
Error: EACCES: permission denied, open
'/opt/openwisp2/wifi-login-pages/client/configs/default.json'
at Object.openSync (node:fs:585:3)
at Object.writeFileSync (node:fs:2170:35)
at /opt/openwisp2/wifi-login-pages/config/setup.js:238:8
at Array.forEach (<anonymous>)
at writeConfigurations
(/opt/openwisp2/wifi-login-pages/config/setup.js:236:17)
at Object.<anonymous>
(/opt/openwisp2/wifi-login-pages/config/setup.js:275:1)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js
(node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load
(node:internal/modules/cjs/loader:822:12) {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: '/opt/openwisp2/wifi-login-pages/client/configs/default.json'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation
about
this command.
--
You received this message because you are subscribed to the Google
Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected]
<mailto:openwisp%[email protected]>.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/openwisp/99b5e849-393d-c06b-baff-20781cd86732%40gmail.com.
--
You received this message because you are subscribed to the Google
Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/openwisp/CAAGgX6JOKH%3DpXLhKVufr3DZDiZc_qt_D_hcYFAtGTi-CL4eiRg%40mail.gmail.com
<https://groups.google.com/d/msgid/openwisp/CAAGgX6JOKH%3DpXLhKVufr3DZDiZc_qt_D_hcYFAtGTi-CL4eiRg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
Informativa Privacy - Ai sensi del D. Lgs n. 196/2003 (Codice Privacy) si
precisa che le informazioni contenute in questo messaggio sono riservate e ad
uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse
pervenuto per errore, La preghiamo di eliminarlo senza copiarlo e di non
inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.
Privacy Information - This message, for the D. Lgs n. 196/2003 (Privacy Code),
may contain confidential and/or privileged information. If you are not the
addressee or authorized to receive this for the addressee, you must not use,
copy, disclose or take any action based on this message or any information
herein. If you have received this message in error, please advise the sender
immediately by reply e-mail and delete this message. Thank you for your
cooperation.
--
You received this message because you are subscribed to the Google Groups
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/openwisp/56ee640b-9963-ddfc-6801-a96eda9737d6%40gmail.com.