lumo:creation_complete_du_plugin_dokuwiki:accueil
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| lumo:creation_complete_du_plugin_dokuwiki:accueil [2026/03/12 10:52] – estro | lumo:creation_complete_du_plugin_dokuwiki:accueil [2026/03/12 11:11] (Version actuelle) – estro | ||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| [[./ | [[./ | ||
| ---- | ---- | ||
| - | ===== Structure du Plugin | + | <adm example Structure du Plugin> |
| + | ==== Structure du Plugin ==== | ||
| < | < | ||
| / | / | ||
| Ligne 11: | Ligne 12: | ||
| └── manifest.ini | └── manifest.ini | ||
| </ | </ | ||
| + | </ | ||
| {{page> | {{page> | ||
| {{page> | {{page> | ||
| {{page> | {{page> | ||
| {{page> | {{page> | ||
| - | <adm warning | + | {{page>5. Exemple de Script Bash Sécurisé}} |
| - | ++++code bash| | + | {{page>6. Configuration Nginx Complète}} |
| - | <code bash> | + | {{page> |
| - | # | + | {{page>8. Utilisation dans DokuWiki }} |
| - | # / | + | {{page> |
| - | # Vérifier les permissions du script | ||
| - | if [ "$(id -u)" -eq 0 ]; then | ||
| - | echo " | ||
| - | exit 1 | ||
| - | fi | ||
| - | |||
| - | # Arguments attendus | ||
| - | ARG1=" | ||
| - | ARG2=" | ||
| - | |||
| - | # Validation côté script (défense en profondeur) | ||
| - | if [[ ! " | ||
| - | echo " | ||
| - | exit 1 | ||
| - | fi | ||
| - | |||
| - | # Exemple d' | ||
| - | case " | ||
| - | " | ||
| - | echo " | ||
| - | echo " | ||
| - | ;; | ||
| - | " | ||
| - | echo " | ||
| - | uname -a | ||
| - | ;; | ||
| - | *) | ||
| - | echo " | ||
| - | exit 1 | ||
| - | ;; | ||
| - | esac | ||
| - | |||
| - | exit 0 | ||
| - | </ | ||
| - | ++++ | ||
| - | </ | ||
| - | <adm achievement 6. Configuration Nginx Complète> | ||
| - | ++++code php| | ||
| - | <code php> | ||
| - | server { | ||
| - | listen 80; | ||
| - | server_name wiki.votre-domaine.com; | ||
| - | root / | ||
| - | index index.php; | ||
| - | | ||
| - | # Sécurité générale | ||
| - | add_header X-Content-Type-Options nosniff; | ||
| - | add_header X-Frame-Options SAMEORIGIN; | ||
| - | add_header X-XSS-Protection "1; mode=block"; | ||
| - | | ||
| - | # DokuWiki principal | ||
| - | location / { | ||
| - | try_files $uri $uri/ @dokuwiki; | ||
| - | } | ||
| - | | ||
| - | location @dokuwiki { | ||
| - | fastcgi_pass unix:/ | ||
| - | include fastcgi_params; | ||
| - | fastcgi_param SCRIPT_FILENAME $document_root/ | ||
| - | fastcgi_param HTTPS off; | ||
| - | } | ||
| - | | ||
| - | # Protection des fichiers sensibles | ||
| - | location ~* ^/ | ||
| - | deny all; | ||
| - | return 403; | ||
| - | } | ||
| - | | ||
| - | # Protection des scripts bash | ||
| - | location ~* \.sh$ { | ||
| - | deny all; | ||
| - | return 403; | ||
| - | } | ||
| - | | ||
| - | # Rate limiting pour l' | ||
| - | limit_req_zone $binary_remote_addr zone=bashexec: | ||
| - | | ||
| - | location / | ||
| - | limit_req zone=bashexec burst=2 nodelay; | ||
| - | fastcgi_pass unix:/ | ||
| - | include fastcgi_params; | ||
| - | fastcgi_param SCRIPT_FILENAME $document_root/ | ||
| - | } | ||
| - | | ||
| - | # Logs spécifiques | ||
| - | access_log / | ||
| - | } | ||
| - | </ | ||
| - | ++++ | ||
| - | </ | ||
| - | <adm achievement> | ||
| - | ++++code conf| | ||
| - | <code conf> | ||
| - | |||
| - | </ | ||
| - | ++++ | ||
| - | </ | ||
lumo/creation_complete_du_plugin_dokuwiki/accueil.1773312757.txt.gz · Dernière modification : de estro
