Packaging AWStats

Bonjour,

Je travaille actuellement sur mon premier package pour YunoHost : l’application AWStats.

Fonctionnalités déjà présentes :

  • Détection automatique de tous les domaines et sous-domaines.
  • Génération des fichiers de configuration d’AWStats pour chacun d’eux.
  • Configuration automatique du cron.

Problème rencontré :
L’application apparaît bien dans les tuiles, et l’URL générée est conforme à celles des autres applications (sans « / » final). Cependant, en cliquant sur la tuile, j’obtiens une erreur 404.
Si j’ajoute manuellement un « / » à la fin de l’URL, la page s’affiche correctement avec la liste des domaines.

Exemple :

Hello,

I’m currently working on my first package for YunoHost: the AWStats application.

Features already implemented:

  • Automatic detection of all domains and subdomains.
  • Generation of AWStats configuration files for each of them.
  • Automatic cron setup.

Issue encountered:
The application appears correctly in the tiles, and the generated URL is consistent with other applications (without the trailing “/”). However, when I click on the tile, I get a 404 error.
If I manually add a “/” at the end of the URL, the page loads properly and displays the list of domains.

Example:

Hi and welcome!

It’s hard to reason about the nature of the problem without seeing the actual code, mind sharing your YNH package sources?

1 Like

Hi ,

Sorry, new users can’t put links in posts.
Anyway , The source code is here : GitHub - sudo-sdg/awstats_ynh: package yunohost afin d'afficher les stats d' awstats :roll_eyes:
It’s my first package and i use grok to help me , but the detection and generate awstats config for all domains is ok :slight_smile:

the index page :

This is a Frankenstein package.
If you really want to package an app, start by reading the packaging docs. Check some simple packages.
Avoid using ai for this task.
You’ll have to spend some time reading and understanding how it works.

2 Likes