mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
Update app_my_webapp.md
add # explanation
This commit is contained in:
parent
f75635fcb5
commit
d4e2a0f4df
1 changed files with 4 additions and 4 deletions
|
@ -1,14 +1,14 @@
|
||||||
# My_webapp documentation
|
# My_webapp documentation
|
||||||
In addition to the Readme.md of the app, here are some useful tips.
|
In addition to the Readme.md of the app, here are some useful tips.
|
||||||
## non-interactive login
|
## 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. 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.
|
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 :
|
To allow non-interactive login, you must follow those steps :
|
||||||
- Enable public-key login in `/etc/ssh/sshd_config`, on the server
|
- 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
|
- 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`
|
- Copy the public key in `/var/www/my_webapp(__#)/.ssh/authorized_keys`
|
||||||
- Adjust the owner of the file and directory to the `webapp#` user
|
- Adjust the owner of the file and directory to the `webapp#` user
|
||||||
- you may now login without a password input, using `sftp -b`, `lftp` of other sftp-enabled clients.
|
- you may now login without a password input, using `sftp -b`, `lftp` of other sftp clients.
|
||||||
|
|
||||||
NB : The port number to use for sftp connexions is the one used for SSH, specified in `/etc/ssh/sshd_config`.
|
NB : The port number to use for SFTP connexions is the one used for SSH, specified in `/etc/ssh/sshd_config`.
|
||||||
|
|
||||||
This setup then allows for auto-update scripts of the site contents. (For example with the Pelican makefile : `make ftp_upload`)
|
This tip then allows for auto-update scripts of the site contents. (For example with the Pelican makefile : `make ftp_upload`)
|
||||||
|
|
Loading…
Reference in a new issue