From 42e0ff119c64e0037c11f9c82cfcd2d22559470a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 4 Nov 2018 22:03:11 +0100 Subject: [PATCH] Sync with french, translated mostly using deepl --- app_my_webapp.md | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/app_my_webapp.md b/app_my_webapp.md index e1daf4fd..9a626334 100644 --- a/app_my_webapp.md +++ b/app_my_webapp.md @@ -1,14 +1,20 @@ -# My_webapp documentation -In addition to the Readme.md of the app, here are some useful tips. -## non-interactive login -This app creates a new user with very limited rights : use of sftp, and access to a `/var/www/my_webapp(__#)` directory (where # is a number in case of multiple installations of the app). Password login is enabled, with a Chroot to the directory. This forces you to update the contents of the website by hand, with a login and a password input. -To allow non-interactive login, you must follow those steps : -- Enable public-key login in `/etc/ssh/sshd_config`, on the server -- Create a public/private key pair for your script, on your "redacting" computer -- Copy the public key in `/var/www/my_webapp(__#)/.ssh/authorized_keys` -- Adjust the owner of the file and directory to the `webapp#` user -- you may now login without a password input, using `sftp -b`, `lftp` or other sftp clients. +# Documentation My_webapp -NB : The port number to use for SFTP connexions is the one used for SSH, specified in `/etc/ssh/sshd_config`. +In addition to the application's Readme.md, here are some useful tips. -This tip then allows for auto-update scripts of the site contents. (For example with the Pelican makefile : `make ftp_upload`) +## Automatic update of the site content + +The application creates a new user with limited rights: it can connect (with a password) through SFTP to access the `/var/www/my_webapp` directory (or `/var/www/my_webapp__` if there are several installations of this application). + +This configuration requires updating the site content manually, with a password connection. + +If you want to automate things, you need to be able to connect without typing a password (i.e. "non-interactive"). Here are the steps to follow to get there: +- Enable public key connection, in `/etc/ssh/ssh/sshd_config`, on the server +- Create a public/private key pair for your script on the "writing" computer - without a protective passphrase. +- Copy the public key to the server, in `/var/www/my_webapp(__#)/.ssh/authorized_keys` +- Set the user `webapp#` as owner of the file and directory +- You can now connect without a password, with `sftp -b`, `lftp` or other SFTP clients. + +NB: The port number to use for the SFTP connection is the one used for the SSH, and configured in `/etc/ssh/sshd_config`. + +This tip allows you to automatically update your site. For example, the makefile of the Pelican tool allows you to use `make ftp_upload`.