47 shaares
1 lien privé
1 lien privé
2 résultats
taggé
web
## Sauvegarde de la base de données
mysqldump -h adresse_serveur -u utilisateur -p password nom_base > fichier.sql
## Sauvegarder des fichiers & Compressions
# wget -m ftp://utilisateur:password@adresse.fr/* -P /volume1/Backup/website
sftp utilisateur@adresse.fr (à compléter !!!)
tar -zcvf /volume1/Backup/website/backup-$(date +%Y-%m-%d-%H-%M-%S).tar.gz /volume1/Backup/website/
Sources :
RewriteEngine on
## Force HTTPS
## RewriteCond %{HTTPS} !=on
## Alternative if the line above doesn’t work.
RewriteCond %{SERVER_PORT} 80
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301]
## Removes www.
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [R=301,L]
## Disable directory listing
Options -Indexes
## Security
# Block access to all hidden files and directories except for the visible content from within the `/.well-known/` hidden directory.
RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
RewriteCond %{SCRIPT_FILENAME} -d [OR]
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)\." - [F]
# Block access to files that can expose sensitive information.
<FilesMatch "(^#.*#|\.(bak|conf|dist|fla|in[ci]|log|orig|psd|sh|sql|sw[op])|~)$">
Require all denied
</FilesMatch>
# Deny Access to .htaccess
# <Files .htaccess>
# Order Allow,Deny
# Deny from all
# </Files>
## Page de maintenance
RewriteCond %{DOCUMENT_ROOT}/maintenance.on -f
RewriteCond %{REQUEST_URI} !/en-maintenance\.html$
## For including image inside
## RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
RewriteRule .* https://nerneste.fr/en-maintenance.html [R=302,L]
Notes :
YOURLS installed on root : If YOURLS root URL is https://yoursite.com/ or https://subdomain.yoursite.com/, the .htaccess file in the root directory must be like
RewriteBase /.
YOURLS installed in subdirectory : If YOURLS root URL is https://yoursite.com/somedir/, the .htaccess file in this subdirectory must be likeRewriteBase /somedir/.
Sources :