When I tried to upload a set of images, I sometimes got the error 504 Gateway Error. This happened because Nginx didn't wait long enough and rejected the request due to the default timeout. To correct this, I added the following lines to the site configuration: /etc/nginx/sites-avalaible which have been taken from this stackoverflow.
So basically, you have to add these lines:
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;
By default, the Bludit content editor (TinyMCE) doesn't include the codesample plugin activated by default. Although, it's very easy to add that useful tool into the editor of your blog.
codesample on the Plugins input.codesample on the Toolbar Top input.With that, it will appear the codesample button on the toolbox, with that the code will be appear inside a code tag, but it won't highlight the code with colors. For that purpose it's possible to install another plugin called prism available here.
I think it is very important and convenient to use webp images in my Bludit website, so I edited the code of Image Gallery Pro plugin to add support to webp images.
1. Change the line 48 of the vendors/novaGallery.php:
$images = glob($dir.'/*{jpg,jpeg,JPG,JPEG,png,PNG}', GLOB_BRACE);
with:
$images = glob($dir.'/*{jpg,jpeg,JPG,JPEG,png,PNG,webp,WEBP}', GLOB_BRACE);
2. Edit the line 100 of vendors/SimpleImage.php:
if(!preg_match('/^image\/(gif|jpeg|png)$/', $this->mimeType)) {
with:
if(!preg_match('/^image\/(gif|jpeg|png|webp)$/', $this->mimeType)) {
3. Edit the line 67 and 70 of app/BluditImageGalleryHelper.php
Line 67:
acceptedFiles: ".jpg,.jpeg,.png",
with:
acceptedFiles: ".jpg,.jpeg,.png,.webp",
Line 70:
dictInvalidFileType: "'.$L->get('This is not a JPEG or PNG.').'",
with:
dictInvalidFileType: "'.$L->get('This is not a JPEG, PNG or WEBP.').'",
With that I can use webp files for my photos-webpage, which makes everything more efficent.
As I recall, setting up SSL certificates for a website was challenging and often came with associated costs. However, a few months ago, I discovered an incredibly user-friendly tool for this purpose called Certbot. It offers the following features:
Additionally, it’s worth highlighting the significance of Let's Encrypt. Having access to free SSL certificates is remarkable. This organization was founded in 2014, meaning that before its inception, purchasing certificates was generally required.
To install certbot in Ubuntu, use:
sudo apt install certbot python3-certbot-nginx
Also here is an example of how to use the tool:
sudo certbot --nginx -d example.com -d www.example.com
Also, it could be even more simple just using the comand
sudo certbot
It will show the webpages configured in the server automatically, making it easier to configure.
In case it's needed to list the installed certificates, just use:
sudo certbot certificates
And in case it's needed to remove one certificate:
sudo certbot delete --cert-name example.com
Pages:
Manjaro with KDE has a problem: it doesn't mount the MTP on the linux filesystem. Because of that it is not possible to manage the MTP files from the terminal. Because of that it is necesary to install a tool which allows to mount the MTP.
pacman -s jmtpfsps -aux | grep kiod6killall kiod6jmtpfs /mountpoint/path