2022-07-20 20:03:45 +02:00
< p >
Ce service permet d 'envoyer des fichiers sur le serveur par <?= linkToDocs(' sftp ', ' SFTP ') ?> afin de les rendre accessibles par <?= linkToDocs(' http ', ' HTTP ' ) ?> .
</ p >
2022-06-16 15:08:50 +02:00
< ? php displayIndex (); ?>
2022-09-07 02:47:50 +02:00
< section >
2022-10-09 23:35:24 +02:00
< h2 > Sites actuellement hébergés </ h2 >
2022-09-07 02:47:50 +02:00
< dl >
< ? php
2022-11-30 23:12:42 +01:00
$sites = query ( 'select' , 'sites' , [ 'username' => $_SESSION [ 'id' ] ? ? '' ]);
2022-10-09 23:35:24 +02:00
if ( $sites === [])
2022-11-20 15:11:54 +01:00
echo ' <p>Ce compte n\'héberge aucun site sur cette instance.<p>' . LF ;
2022-10-09 23:35:24 +02:00
else {
2022-11-20 15:11:54 +01:00
echo ' <dl>' . LF ;
2022-10-09 23:35:24 +02:00
foreach ( $sites as $site ) {
$url = 'http' . (( $site [ 'domain_type' ] === 'onion' ) ? '' : 's' ) . '://' . $site [ 'domain' ] . '/' ;
2022-09-07 02:47:50 +02:00
?>
2022-11-01 18:19:47 +01:00
< dt >< code >/< ? = $site [ 'site_dir' ] ?> </code></dt>
2022-09-07 02:47:50 +02:00
< dd >
< a href = " <?= $url ?> " rel = " external " >< ? = $url ?> </a>
</ dd >
2022-10-09 23:35:24 +02:00
< ? php
}
2022-11-20 15:11:54 +01:00
echo ' </dl>' . LF ;
2022-10-09 23:35:24 +02:00
}
?>
2022-09-07 02:47:50 +02:00
</ section >
2022-05-20 00:15:13 +02:00
2022-11-28 17:16:30 +01:00
< section >
< h2 > Ajouter un accès de site </ h2 >
< p > Pour pouvoir y ajouter un accès par ce service , un site doit auparavent être téléversé dans un sous - dossier direct de l ' espace SFTP . Le nom de ce sous - dossier ne peut contenir que < abbr title = " abcdefghijklmnopqrstuvwxyz " >< code > a </ code >-< code > z </ code ></ abbr > , < abbr title = " ABCDEFGHIJKLMNOPQRSTUVWXYZ " >< code > A </ code >-< code > Z </ code ></ abbr > , < abbr title = " 0123456789 " >< code > 0 </ code >-< code > 9 </ code ></ abbr > , < code > _ </ code > et < code >-</ code >.</ p >
</ section >
2022-05-21 02:13:42 +02:00
< section >
2022-09-07 02:47:50 +02:00
< h2 > SFTP </ h2 >
2022-05-20 00:15:13 +02:00
2022-09-07 02:47:50 +02:00
< p >
2022-11-07 19:40:40 +01:00
Vous avez accès à un espace < abbr title = " SSH File Transfert Protocol " > SFTP </ abbr > , limité à < ? php
2022-12-10 18:19:37 +01:00
$quotaSize = ( $_SESSION [ 'type' ] === 'approved' ) ? CONF [ 'ht' ][ 'user_quota_approved' ] : CONF [ 'ht' ][ 'user_quota_testing' ];
2022-11-07 19:40:40 +01:00
echo (( $quotaSize >> 30 ) >= 1 ) ? $quotaSize >> 30 . ' ' . linkToDocs ( 'units' , '<abbr title="gibioctet">Gio</abbr>' ) : $quotaSize >> 20 . ' ' . linkToDocs ( 'units' , '<abbr title="mébioctet">Mio</abbr>' )
?> . Vous pouvez téléverser vos sites dans <code>/<nom du site>/*</code>. Indiquez les données ci-dessous à votre client <abbr title="SSH File Transfert Protocol">SFTP</abbr> pour y accéder.
2022-09-07 02:47:50 +02:00
</ p >
2022-05-20 00:15:13 +02:00
2022-09-07 02:47:50 +02:00
< section >
< h3 > Authentifier le serveur </ h3 >
2022-05-20 00:15:13 +02:00
2022-11-01 18:19:47 +01:00
< p > Un enregistrement SSHFP est disponible .</ p >
2022-09-07 02:47:50 +02:00
< details >
< summary > Clé publique </ summary >
< code >< ? = file_get_contents ( CONF [ 'ht' ][ 'sftp_pub' ]) ?> </code>
</ details >
2022-05-21 02:13:42 +02:00
2022-10-06 15:03:21 +02:00
< details open = " " >
2022-09-07 02:47:50 +02:00
< summary > Empreinte </ summary >
< code >< ? = file_get_contents ( CONF [ 'ht' ][ 'sftp_fp' ]) ?> </code>
</ details >
2022-05-21 02:13:42 +02:00
2022-09-07 02:47:50 +02:00
< details >
< summary > Art ASCII </ summary >
< pre >< ? = file_get_contents ( CONF [ 'ht' ][ 'sftp_asciiart' ]) ?> </pre>
</ details >
2022-06-16 15:08:50 +02:00
2022-09-07 02:47:50 +02:00
</ section >
2022-06-16 15:08:50 +02:00
2022-09-07 02:47:50 +02:00
< section >
< h3 > Se connecter au serveur </ h3 >
2022-11-30 23:12:42 +01:00
< a href = " sftp://<?= isset( $_SESSION['display-username'] ) ? $_SESSION['display-username'] : '<username>'; ?>@<?= CONF['ht']['sftp_domain'] ?>:<?= CONF['ht']['public_sftp_port'] ?>/ " > sftp ://< ? = isset ( $_SESSION [ 'display-username' ]) ? $_SESSION [ 'display-username' ] : '<username>' ; ?> @<?= CONF['ht']['sftp_domain'] ?>:<?= CONF['ht']['public_sftp_port'] ?>/</a>
2022-09-07 02:47:50 +02:00
< dl >
< dt > Serveur </ dt >
< dd >
< code >< ? = CONF [ 'ht' ][ 'sftp_domain' ] ?> </code>
</ dd >
< dt > Port </ dt >
< dd >
< code >< ? = CONF [ 'ht' ][ 'public_sftp_port' ] ?> </code><?php if (CONF['ht']['public_sftp_port'] === 22) echo " (par défaut)"; ?>
</ dd >
< dt > Dossier </ dt >
< dd >
< code >/</ code >
</ dd >
< dt > Utilisataire </ dt >
< dd >
2022-11-30 23:12:42 +01:00
< code >< ? = isset ( $_SESSION [ 'display-username' ]) ? $_SESSION [ 'display-username' ] : '<username>' ; ?> </code>
2022-09-07 02:47:50 +02:00
</ dd >
< dt > Clé de passe </ dt >
< dd >
2022-10-06 15:03:21 +02:00
celle de votre compte
2022-09-07 02:47:50 +02:00
</ dd >
</ dl >
</ section >
2022-06-16 15:08:50 +02:00
</ section >
2022-11-01 18:19:47 +01:00
< section >
< h2 > HTTP </ h2 >
< h3 > CSP </ h3 >
< p >
Une politique de sécurité du contenu ( < abbr title = " Content-Security-Policy " > CSP </ abbr > ) interdit l ' intégration de JavaScript ou de ressources depuis des sites distants .
</ p >
< h3 > Compression gzip </ h3 >
< p >
La compression < em > gzip </ em > est supportée , si le client le supporte et que le fichier est disponible , < code > chemin . gz </ code > est servi au lieu de < code > chemin </ code >.
</ p >
< h3 > Page d ' index </ h3 >
< p >
Lors d ' une requête sur un dossier , le premier des fichiers suivants qui existe dans ce dossier est répondu :
</ p >
< ol >
< li >< code > index . html </ code ></ li >
< li >< code > index . md </ code ></ li >
< li >< code > index . gmi </ code ></ li >
</ ol >
< h3 > Page d ' erreur 404 </ h3 >
< p >
Lors d ' une requête aboutissant à une erreur < code > 404 </ code > , le premier des fichiers suivants qui existe à la racine du site est répondu :
</ p >
< ol >
< li >< code > 404. html </ code ></ li >
< li >< code > 404. md </ code ></ li >
< li >< code > 404. gmi </ code ></ li >
</ ol >
</ section >