MediaWiki/Serveur internet sous Windows

Aller à la navigation Aller à la recherche

La création d'un serveur internet sous Windows.

Plus précisément, sous Windows 10 Pro.

Prérequis

Organisation des dossiers sur le serveur

  • ...\wamp\apache\
  • ...\wamp\mysql\
  • ...\wamp\php\
  • ...\wamp\www\ : contiendra tous les sous-dossiers correspondants aux différents sites
    • ...\wamp\www\site1\ : dossier pour le premier site
    • ...\wamp\www\site2\ : dossier pour le deuxième site

Les sources

Apache, Apache 2.4.48

MySQL, MySQL Community Server 8.0.26

PHP, version 7.4.23

phpmyadmin, version 5.1.1

MediaWiki, version 1.36.1 ; non compatible avec PHP 8.x

MySQL et prérequis

Site officiel de MySQL

MySQL Community Server :

PHP 7.4.x ou plus récent, avec les extensions suivantes :

  • ctype
  • iconv
  • json
  • mbstring
  • xml
  • openssl, fortement recommandé

MySQL :

  • MySQL x.x.x ou plus récent

Outils

Paramétrage

Apache, httpd.conf, ajouter les lignes suivantes

  • LoadModule php7_module "...\php\php7apache2_4.dll"
  • AddHandler application/x-httpd-php .php
  • # configure the path to php.ini
  • PHPIniDir ...

Apache, httpd.conf, modifier

  • ServerRoot ".../wamp/apache24"
  • Listen 80
  • DocumentRoot ".../wamp/www"
  • <Directory ".../wamp/www">

Apache, httpd.conf, modifier

  • <IfModule dir_module>
  • DirectoryIndex index.html, index.htm, index.php
  • </IfModule>

PHP, php.ini

  • extension_dir = "...\php\ext"
  • session.save_path = "...\temp"

SSL

Commandes

Installation du service Apache
...\Apache24\bin\httpd -k install
Démarrage du service Apache
...\Apache24\bin\httpd -k start
Redémarrage du service Apache
...\Apache24\bin\httpd -k restart

Moniteur Apache (icone dans la barre de notification)

...\Apache24\bin\ApacheMonitor.exe
Vérification du serveur. Fichier index.php
<?php
echo phpinfo();
?>

MySQL

Pour accéder à MySQL en ligne de commande :

  • fenêtre DOS ;
  • mysql -u root -p

Sauvegarde d'une base de données :

  • mysqldump --databases nombase > nombase-sauv.sql

Import d'une base :

  • mysql -u root -p nombase < nombase-sauve.sql

Kono personnalisation

Extensions

LdapAuthentication

Auth remoteuser

NoTitle, pour ne pas afficher le titre de l'article

Habillage

Utilisation de l'habillage Pivot