I modified the file /plugins/ckeditor/ckeditor/styles.js
to have a much more easier way to put code in my memo.
Before:
{
name: 'Special Container',
element: 'div',
styles: {
padding: '5px 10px',
background: '#eee',
border: '1px solid #ccc'
}
},
After:
{
name: 'Special Container',
element: 'div',
styles: {
padding: '5px 10px',
background: '#eee',
border: '1px solid #ccc',
'white-space': 'nowrap',
'overflow': 'auto',
'font-family': 'monospace, monospace',
'font-size': '0.9rem'
}
},
Information from shellhacks.com.
Download
The following command recursively downloads your site with all its files and folders from FTP server and saves them to the current directory.
wget -r -l 0 -nH -X folder_to_skip ftp://user:pass@ftp.server.com
option |
description |
user |
FTP username |
pass |
FTP password |
ftp.server.com |
IP address or domain name of an FTP server |
-r |
Recursive retrieving |
-l |
Maximum recursion depth (0 = unlimit) (default = 5) |
-nH |
Disable generation of host-prefixed directories |
-X |
exclude a list of directories |
Backup
Now you can compress the folder with your site as follows:
tar -czf site-backup-$(date +%Y%m%d-%H%M%S).tar.gz yoursite.com
Install pluxml on raspberry pi
I am using nginx + php7 + pluxml following these 3 links:
- https://www.raspberrypi.org/documentation/remote-access/web-server/nginx.md
- https://blog.norore.fr/index.php?article13/pluxml-nginx-et-php-7-sont-dans-un-bateau
- https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/
$ sudo nano /etc/php/7.3/fpm/pool.d/www.conf
[www]
user = www-data
group = www-data
listen = /run/php/php7.3-fpm.sock
listen.owner = www-data
listen.group = www-data
;listen.mode = 0660
$ sudo nano /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location @handler {
rewrite ^/(.*)$ /index.php? last;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /(data/configuration|version|update|\.ht) {
deny all;
}
}
Then restart both services.
Interesting problem : Nginx sucessfully password protects PHP files, but then prompts you to download them
Answer : The problem is a fundamental misunderstanding as to how nginx processes a request. Basically, nginx chooses one location to process a request.
You want nginx to process URIs that begin with /admin in a location block that requires auth_basic. In addition, URIs that end with .php need to be sent to PHP7.
So you need two fastcgi blocks, one to process normal PHP files and one to process restricted PHP files.