Deploying Openwisp Using Ansible error 404 Not found nginx

Hello everyone!
I’m trying to install OpenWISP on a virtual machine (Ubuntu 24.04.5). I’m also testing it on a local machine (also running Ubuntu), following the official documentation: Deploying OpenWISP Using Ansible | OpenWISP dev documentation

I followed every step carefully and didn’t encounter any errors. First, I assigned the IP of the machine where I want to install OpenWISP from my local machine, where I’m running Ansible. I did this by editing the /etc/hosts file:
`127.0.0.1 localhost
127.0.1.1 yaainternet

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

192.168.3.139 openwisp2.yaainternet.com`

The hosts and playbook.yml files I created look like this:
Hosts:
“[openwisp2]
openwisp2.yaainternet .com”

Playbook.yml:
“- hosts: openwisp2
become: “{{ become | default(‘yes’) }}”
roles:
- openwisp.openwisp2
vars:
openwisp2_default_from_email: “openwisp2@openwisp2.yaainternet .com””

When I run the playbook, it executes without errors, but it skips some tasks:
“PLAY RECAP *************************************************************************************************************
openwisp2.yaainternet .com : ok=103 changed=0 unreachable=0 failed=0 skipped=77 rescued=0 ignored=0”

According to the documentation, after running the playbook, I should be able to access the OpenWISP GUI by navigating to:
https: //192.168.3.139/admin or https://openwisp2.yaainternet .com/admin but it only works with the IP.

However, instead of loading the interface, I get:
‘404 Not found nginx’

Has anyone encountered a similar issue? Any advice would be greatly appreciated!

I would start by following the openwisp troubleshooting guide Troubleshooting | OpenWISP 24.11 documentation or checking nginx error/access logs. I took a look at the role GitHub - openwisp/ansible-openwisp2: Ansible role that installs and upgrades OpenWISP., and it seems relatively complex, so I’m guessing the openwisp community will be the best place to seek advice Community Support - OpenWISP.

1 Like

I’m fairly sure your issue is you named the host:

[openwisp2]

I think it needs to be:

[openwisp2.yaainternet .com]

I just ran the playbook for the first time and had the exact same issue - checking the nginx config (/etc/nginx/sites-enabled/openwisp) and the /opt/openwisp2/openwisp2/settings.py file showed that it had used my Ansible hostname and not the fqdn I’d set for the host…