# Deploying Openwisp Using Ansible error 404 Not found nginx

**URL:** <https://forum.ansible.com/t/deploying-openwisp-using-ansible-error-404-not-found-nginx/42460>\
**Category:** Get Help\
**Tags:** ubuntu\
**Created:** [May 5, 2025, 8:46pm UTC](https://forum.ansible.com/t/deploying-openwisp-using-ansible-error-404-not-found-nginx/42460 "2025-05-05T20:46:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aletz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/aletz/32/8353_2.png) [@Aletz](https://forum.ansible.com/u/Aletz)\
**Post date:** [May 5, 2025, 8:46pm UTC](https://forum.ansible.com/t/deploying-openwisp-using-ansible-error-404-not-found-nginx/42460/1 "2025-05-05T20:46:53Z")

</div>

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](https://openwisp.io/docs/dev/ansible/user/quickstart.html)

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’**

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/b/b0e3a3e9cd2ca131284b20b423d1325753d4bac7.png)

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

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [May 6, 2025, 7:23pm UTC](https://forum.ansible.com/t/deploying-openwisp-using-ansible-error-404-not-found-nginx/42460/2 "2025-05-06T19:23:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mikecsmith](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mikecsmith/32/8424_2.png) [@mikecsmith](https://forum.ansible.com/u/mikecsmith)\
**Post date:** [May 13, 2025, 12:13am UTC](https://forum.ansible.com/t/deploying-openwisp-using-ansible-error-404-not-found-nginx/42460/3 "2025-05-13T00:13:01Z")

</div>

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

```auto
[openwisp2]

```

I think it needs to be:

```auto
[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…

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [May 13, 2025, 7:56pm UTC](https://forum.ansible.com/t/deploying-openwisp-using-ansible-error-404-not-found-nginx/42460/4 "2025-05-13T19:56:38Z")

</div>

```auto
[openwisp2]
openwisp2.yaainternet.com

```

The ansible host is `openwisp2.yaainternet.com` in the example above, `openwisp2` is just the inventory group name. Ansible playbooks can target groups or specific hosts, but the `inventory_hostname` variable will reflect the host.

The role is using the inventory\_hostname variable to set up sites-enabled, so I don’t think the inventory is the issue: [ansible-openwisp2/tasks/nginx.yml at master · openwisp/ansible-openwisp2 · GitHub](https://github.com/openwisp/ansible-openwisp2/blob/master/tasks/nginx.yml#L75-L80).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [June 12, 2025, 7:57pm UTC](https://forum.ansible.com/t/deploying-openwisp-using-ansible-error-404-not-found-nginx/42460/5 "2025-06-12T19:57:00Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
