Baking textures in Blender by ChatGPT

Sure! Here’s a step-by-step guide on how to bake a texture in Blender, including the diffuse, normal, roughness, emissive, and height maps.

  1. Open Blender and create a new project.
  2. In the 3D Viewport, select the object you want to bake a texture for.
  3. In the Properties panel, go to the Materials tab and create a new material for the object if it doesn’t already have one.
  4. In the Shader Editor,
Continue reading

Install IonCube Loader on Ubuntu 22.04 LTS

apt install wget apt-transport-https gnupg2 software-properties-common
cd /opt
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -xvzf ioncube_loaders_lin_x86-64.tar.gz
cd ioncube
ls -la
 php -i | grep extension_dir

cp ioncube_loader_lin_8.1.so /usr/lib/php/20210902/
cp ioncube_loader_lin_8.1_ts.so /usr/lib/php/20210902/

edit php.ini and add the line:
zend_extension=/usr/lib/php/20210902/ioncube_loader_lin_8.1.so

Nginx config lines for Ispconfig

include /etc/nginx/conf.dre/harden-wp.conf;
set_real_ip_from  77.171.238.227;
real_ip_header    X-Forwarded-For;
real_ip_recursive  on;
location / {
         try_files $uri $uri/ /index.php?$args;
        }
# Directives to send expires headers and turn off 404 error logging. #
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
        access_log off; log_not_found off; expires max;
}
location ~ .(gif|png|jpe?g|mp4|jpg|avi|mpe?g|bmp|pdf|zip)$ {
   valid_referers none blocked ustoopia.nl www.ustoopia.nl *.ustoopia.nl;
   if ($invalid_referer) {
      return 403;
   }
}
client_max_body_size 1024M;
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
add_header Content-Security-Policy "upgrade-insecure-requests";
add_header 'Referrer-Policy' 
Continue reading

Harden Nginx for WordPress

mkdir /etc/nginx/conf.wp

joe /etc/nginx/conf.wp/harden-wordpress.conf

include /etc/nginx/conf.wp/harden-wordpress.conf
############ WordPress ####################

# Disable logging for favicon and robots.txt
location = /favicon.ico {
  try_files /favicon.ico @empty;
  access_log off;
  log_not_found off;
  expires max;
}
location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
    try_files $uri /index.php?$args;
}

#Deny access to wp-content folders for suspicious files
location ~* ^/(wp-content)/(.*?)\.(zip|gz|tar|bzip2|7z)$ {
  deny all;
}

location ~ ^/wp-content/uploads/sites/16/sucuri {
  deny all;
}

location ~ ^/wp-content/updraft {
Continue reading

MySQL5.7 docker setup

cd /opt
docker pull mysql/mysql-server:8.0
docker run --name=mysql80 -d \
    -p 3307:3306 \
    -e MYSQL_ROOT_PASSWORD=ustO0piaustO0pia \
    -v mysql:/var/lib/mysql80 \
    --restart unless-stopped \
    mysql/mysql-server:8.0
docker logs mysql80 2>&1 | grep GENERATED

GENERATED ROOT PASSWORD: Axegh3kAJyDLaRuBemecis&EShOs

docker exec -it mysql80 mysql -uroot -p
ALTER USER 'root'@'localhost' IDENTIFIED BY 'ustO0piaustO0pia';
CREATE USER 'root'@'%' IDENTIFIED BY 'ustO0piaustO0pia';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'ustO0piaustO0pia';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
Continue reading

Secure headers for Nginx

add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
add_header Content-Security-Policy "upgrade-insecure-requests";
add_header 'Referrer-Policy' 'origin';
add_header Expect-CT "max-age=7776000, enforce";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Frame-Options "SAMEORIGIN";
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_stapling on;
ssl_stapling_verify on;

PHP Variables

post_max_size = 1024M
max_execution_time = 0
max_input_time = 300
max_input_vars = 3000
memory_limit = 512M
upload_max_filesize = 1024M
date.timezone = Europe/Berlin
allow_url_fopen = Off
allow_url_include = Off
open_basedir = Off

Security.txt… Continue reading

Mariadb users and rights

mysql -u root -p

update mysql.user set host = '%' where user='root';

CREATE USER 'root'@'%' IDENTIFIED BY 'ustO0piaustO0pia';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'ustO0piaustO0pia';
GRANT GRANT OPTION ON *.* TO 'root'@'%';

CREATE USER 'andre'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'andre'@'%' IDENTIFIED BY 'password';
GRANT GRANT OPTION ON *.* TO 'andre'@'%';

CREATE USER 'andre'@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 
Continue reading

chown

alias chown1='chown -R web1:client0 /var/www/web1/web/ /var/www/web1/.ssh /var/www/web1/backup/ /var/www/web1/cgi-bin/ /var/www/web1/private/ /var/www/web1/tmp/ /var/www/web1/webdav/'
alias chown2='chown -R web2:client0 /var/www/web2/web/ /var/www/web2/.ssh /var/www/web2/backup/ /var/www/web2/cgi-bin/ /var/www/web2/private/ /var/www/web2/tmp/ /var/www/web2/webdav/'
alias chown3='chown -R web3:client0 /var/www/web3/web/ /var/www/web3/.ssh /var/www/web3/backup/ /var/www/web3/cgi-bin/ /var/www/web3/private/ /var/www/web3/tmp/ /var/www/web3/webdav/'
alias chown4='chown -R web4:client0 /var/www/web4/web/ /var/www/web4/.ssh /var/www/web4/backup/ /var/www/web4/cgi-bin/ /var/www/web4/private/ /var/www/web4/tmp/ /var/www/web4/webdav/'
alias chown5='chown -R web5:client0 /var/www/web5/web/ /var/www/web5/.ssh /var/www/web5/backup/ /var/www/web5/cgi-bin/ /var/www/web5/private/ /var/www/web5/tmp/ /var/www/web5/webdav/'
alias chown6='chown -R web6:client0 /var/www/web6/web/ /var/www/web6/.ssh /var/www/web6/backup/ /var/www/web6/cgi-bin/ /var/www/web6/private/ /var/www/web6/tmp/ /var/www/web6/webdav/'
alias chown7='chown -R web7:client0 
Continue reading