How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

September 22, 2022

curl: (60) SSL certificate problem: certificate has expired

Filed under: Linux — Tags: , , , — admin @ 11:30 am

I have this problem on a debian 9 client, that try to run a curl to a website that have valid SSL .

The fix is to blacklist the expired ssl on the client computer, not on server.

sed -i ‘s|mozilla/DST_Root_CA_X3.crt|!mozilla/DST_Root_CA_X3.crt|’ /etc/ca-certificates.conf && update-ca-certificates

September 19, 2022

Using FTP usernames with @ – symbol in midnight commander, virtual username

Filed under: Linux — Tags: , , , , — admin @ 5:47 pm

Mc, is a file manager for linux. But if you want to use a virtual ftp account you will have a problem

The format is  [username[:password]@]hostname  . However if you have a username with @ into it that is the problem.

The solution is to replace the @ with +

So if you have test@test.com then you will input test+test.com@hostname.com

June 2, 2020

Change docker root directory by creating a systemd drop-in service file

Filed under: Linux — Tags: , , — admin @ 2:20 pm

 It is possible to change docker root directory by creating a systemd drop-in service file. This is useful when you want images and containers or docker generated files to be located in another partition or drive.

Create drop-in configuration file

  1. Create the systemd directory:
    sudo mkdir /etc/systemd/system/docker.service.d/
  2. Create the docker.service drop-in file:
    sudo nano /etc/systemd/system/docker.service.d/docker.root.conf
  3. Add the following configuration :
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -g /your/custom/docker/root -H fd://

April 23, 2020

⚠ pngquant pre-build test failed ℹ compiling from source ✔ pngquant pre-build test passed successfully ✖ Error: pngquant failed to build, make sure that libpng-dev is installed

Filed under: Linux — Tags: , , , — admin @ 12:44 pm

I have try today a yarn install but have some error . The fix was to run

apt install -y build-essential gcc make libpng-dev

April 3, 2020

How to bypass htpasswd with specific ip

Filed under: Linux — Tags: , , — admin @ 2:15 pm

If you have code below and want to bypass your ip then you need to go to final form

AuthType Basic
AuthName “Private area”
AuthUserFile /var/www/html/dpath/.htpasswd
Require valid-user

Into this:

AuthType Basic
AuthName “Private area”
AuthUserFile /var/www/html/dpath/.htpasswd
Require valid-user

Order allow,deny
Allow from xxx.xxx.xxx.xxx
satisfy any

Older Posts »

Powered by WordPress