« MediaWiki/Serveur internet sous Windows » : différence entre les versions
m (→Prérequis) |
m (→Paramétrage) |
||
Ligne 78 : | Ligne 78 : | ||
Apache, <code>httpd.conf</code>, modifier | Apache, <code>httpd.conf</code>, modifier | ||
* <code>ServerRoot " | * <code>ServerRoot "C:\phpwamp/apache24"</code> | ||
* <code>Listen 80</code> | * <code>Listen 80</code> | ||
* <code>DocumentRoot " | * <code>DocumentRoot "C:\phpwamp/www"</code> | ||
* <code><Directory " | * <code><Directory "C:\phpwamp/www"></code> | ||
Apache, <code>httpd.conf</code>, modifier | Apache, <code>httpd.conf</code>, modifier | ||
Ligne 99 : | Ligne 99 : | ||
=== PHP === | === PHP === | ||
PHP, <code>php.ini</code> | PHP, <code>php.ini</code> | ||
* <code>extension_dir = " | * <code>extension_dir = "C:\phpwamp\php\ext"</code> | ||
* <code>session.save_path = " | * <code>session.save_path = "C:\phpwamp\tmp"</code> | ||
==== phpinfo.php ==== | ==== phpinfo.php ==== |
Version du 27 août 2021 à 22:32
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
C:\phpwamp\apache\
C:\phpwamp\mysql\
C:\phpwamp\php\
C:\phpwamp\www\
: contiendra tous les sous-dossiers correspondants aux différents sitesC:\phpwamp\www\site1\
: dossier pour le premier siteC:\phpwamp\www\site2\
: dossier pour le deuxième site
Les sources
Apache, Apache 2.4.48
- https://www.apachelounge.com/download/
- https://www.apachelounge.com/download/additional/ compléments
- https://httpd.apache.org/docs/2.4/ssl/ssl_howto.html le chiffrement SSL
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 :
- https://dev.mysql.com/downloads/mysql/
- mysql-8.0.26-winx64.zip
- https://dev.mysql.com/downloads/connector/odbc/
- mysql-connector-odbc-8.0.26-winx64.msi
- nécessite Visual Studio 2018 x64
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
MySQL, installation
Choix des éléments :
- MySQL Server 8.0.26 - x64
- MySQL Workbench 8.0.26 - x64
- Connector/ODBC 8.0.26 - x64
- Samples and Examples 8.0.26 - x86
- MySQL Documentation - x86
Outils
- MySQL Utilities requires Python x.x
- MediaWiki 1.36.1
- https://www.mediawiki.org/wiki/Compatibility/fr : attention à la compatibilité avec PHP
- https://wiki.meurisse.org/wiki/MediaWiki#Prerequisite guide
Paramétrage
Apache
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 "C:\phpwamp/apache24"
Listen 80
DocumentRoot "C:\phpwamp/www"
<Directory "C:\phpwamp/www">
Apache, httpd.conf
, modifier
<IfModule dir_module> DirectoryIndex index.html, index.htm, index.php </IfModule>
Problème connu
Si certaines extension PHP ne sont pas chargées (notamment curl, intl, ldap), ajouter les chemins systèmes suivants :
C:\phpwamp\php\ C:\phpwamp\php\ext\
PHP
PHP, php.ini
extension_dir = "C:\phpwamp\php\ext"
session.save_path = "C:\phpwamp\tmp"
phpinfo.php
<?php // Affiche toutes les informations, comme le ferait INFO_ALL phpinfo(); ?>
PHP, les extensions
PHP, php.ini
- extension=intl ; pour MediaWiki
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