# My\_webapp internal links fail

**URL:** https://forum.yunohost.org/t/my-webapp-internal-links-fail/27948
**Category:** Support apps
**Tags:** my\_webapp, english
**Created:** [January 8, 2024, 6:29pm UTC](https://forum.yunohost.org/t/my-webapp-internal-links-fail/27948 "2024-01-08T18:29:04Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dudenas](https://forum.yunohost.org/user_avatar/forum.yunohost.org/dudenas/32/1165_2.png) [@dudenas](https://forum.yunohost.org/u/dudenas)
#### Post date: [January 8, 2024, 6:29pm UTC](https://forum.yunohost.org/t/my-webapp-internal-links-fail/27948/1 "2024-01-08T18:29:04Z")

</div>

When uploading a flat file CMS (tried Kirby and Grav and Pico CMS) to webapp folder, nginx does not follow their link structure. For example, Kirby displays the UI, but fails to fetch images, and any click on a link results in 404 not found. Grav goes straight to 404 (caused by initial admin panel redirection).  
I actually need only one CMS, but wanted to make sure that the problem is not in CMS but somewhere in my Yunohost/webapp.  
Do I have to do some extra Ngnix config? Why could this be happening?

### My YunoHost server

**Hardware:** Old laptop or computer  
**YunoHost version:** 11.2.9.1  
**I have access to my server :** Through SSH  
**If your request is related to an app, specify its name and version:** my\_webapp\_\_2 1.0~ynh15

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [January 8, 2024, 7:03pm UTC](https://forum.yunohost.org/t/my-webapp-internal-links-fail/27948/2 "2024-01-08T19:03:58Z")

</div>

Can’t be sure without more accurate details on the exact structure of the URL you mention, but to me that sound like you need to configure what’s the root of the application **inside** the application (i’m assuming you installed your app on a subpath rather than a dedicated domain)

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [January 8, 2024, 9:01pm UTC](https://forum.yunohost.org/t/my-webapp-internal-links-fail/27948/3 "2024-01-08T21:01:33Z")

</div>

It’s probably an ownership problem. Uploaded files must have the correct owner like this  
`my_webapp__4 www-data`  
If you have more than one custom web app, you’ll have them numbered “\_\_3”

---

<div class="post-metadata">

### Author: ![rodinux](https://forum.yunohost.org/user_avatar/forum.yunohost.org/rodinux/32/7029_2.png) [@rodinux](https://forum.yunohost.org/u/rodinux)
#### Post date: [January 8, 2024, 10:49pm UTC](https://forum.yunohost.org/t/my-webapp-internal-links-fail/27948/4 "2024-01-08T22:49:48Z")

</div>

It can be a nginx.conf to add, perhaps you can try add this. not sure but for a wordpress cms it works.

```auto
    if (!-e $request_filename)
     {
     rewrite ^(.*)$ /index.php?q=$1 last;
     

```

on this part

```auto
location __PATH__ / {

    # Path to source
    alias __INSTALL_DIR__ /www/;

    # Default indexes and catch-all
    index index.html index.php;
    try_files $uri $uri/ __PATH__ /index.php?$args;

    # Remove index.php from URL needed on some cms
    if (!-e $request_filename)
     {
     rewrite ^(.*)$ /index.php?q=$1 last;
     }

    # Prevent useless logs
    location = __PATH__ /favicon.ico {
        log_not_found off;
        access_log off;
    }

```

---

<div class="post-metadata">

### Author: ![dudenas](https://forum.yunohost.org/user_avatar/forum.yunohost.org/dudenas/32/1165_2.png) [@dudenas](https://forum.yunohost.org/u/dudenas)
#### Post date: [January 10, 2024, 2:50pm UTC](https://forum.yunohost.org/t/my-webapp-internal-links-fail/27948/5 "2024-01-10T14:50:32Z")

</div>

Thank you! It took some time for me to understand the difference between **PATH** and **INSTALL\_DIR** , but it appears to work. Path is basically / in my case, because I used a subdomain for my\_webapp installation.

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [January 25, 2024, 2:50pm UTC](https://forum.yunohost.org/t/my-webapp-internal-links-fail/27948/6 "2024-01-25T14:50:52Z")

</div>

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