If you change bullseye to bookworm in /etc/apt/sources.list , you also have to change non-free to non-free-firmware.
DG.
Re: Debian 12 Bookworm
Posted: 17 Jan 2024, 00:12
by admin
Enough issues to talk about, when moving http://dolfgeerdink.nl (my website) and all others together with this phpbb instance.
Also my own php LAN-RF-Light-System needed special attention.
The new server running Debian 12, PHP8.2, apache2 (https) and new phpbb 3.3.11.
So far fixed:
- php from apache server, needs also the id_rsa(.pub) within /var/www/html/ (dglight.php)
- Within MariaDB changed all links within posts to local paths. (Several old names still were not changed, DGWP01.)
- New xymon server setup, needs apache xymon folder adjustments (xymon.conf), as well as it's own config (/etc/xymon/hosts.cfg)
- Where it was to put the favicon.ico file for phpbb? root folder was enough, reboot needed (service apache2 restart)
- Updating old phpbb (not fully converted 3.3.0) was impossible due to the fact is was installed within OS, not just in /var/www/html/
This last issue took over a week, due to testing etc.
I made within ACP a full backup (3.3.0) and restored that over a newly installed 3.3.11.
A conversion was needed for the database but after that all was working fine
(Not) fixed:
- The validation of https within website.
Tried several .pem .crt .crs .crt created files with openssl keygen etc etc. never got it working.
Also tried adding it within the DNS server that reroute my IP, no result.
The following helped me out.
On Debian 12, 1st: sudo apt-get install certbot
Follow must settings on:
Apache virtual server should point to domain.com, .nl or whatever. Apache testconfig should run without errors.
Let's Encrypt within Webmin to the domain.com, .nl or whatever.
First test did not show me the secure settings, but left it as is.
Went to a friend and checked there, and all was working great!
Only internal video still not working to outside, but that's not a show stopper
DG.
Re: Debian 12 Bookworm (Apache ip-list)
Posted: 30 Jan 2024, 00:41
by admin
We want a daily overview of ip-addresses using my webserver.
Most logging for this is in: /var/log/apache2/access.log
Changed daily @00:00 to access.log.1
Older logs are compressed, i.e. access.log.2.gz, ~3.gz, ~4.gz etc.
Made a script that MUST be run with sudo or as root.
The log we wanna copy is rather secure.
Output is (yet) set to folder: /root/
#/bin/bash
#
# Script takes ip addresses (once) from 'access.log' from apache(2)
# DG (C) 2024
#
# Goto right path
cd ~
# Check if access.log existand copy it
if [ -f /var/log/apache2/access.log ]; then
cp /var/log/apache2/access.log Myfile.txt;
else
echo "Copy does not work!!!";
fi
# Subtract all ip addresses from copy into Myfile2.txt
while IFS='' read -r LINE || [ -n "${LINE}" ]; do cut -d' ' -f1; done < ~/Myfile.txt >> ~/Myfile2.txt
# Sort will unify the list to 'once' occurence and put output into ip-list-today.txt
sort ~/Myfile2.txt | uniq > ~/ip-list-today.txt
# remove old files
if [ -f ~/ip-list-today.txt ]; then
echo "OK";
if [ -f ~/Myfile.txt ]; then
rm ~/Myfile.txt;
fi
if [ -f ~/Myfile2.txt ]; then
rm ~/Myfile2.txt;
fi
else
echo "Something went wrong!";
fi
#
# END
ip-list-[day_month_year].txt contains all ip connections for that day (once).
Also once listed when somebody with 'same' ip made more then 1 connection.
Newer code is being made with the date in the name.
#/bin/bash
#
# Script takes ip addresses (once) from 'access.log' from apache(2)
# DG (C) 2024
# https://dolfgeerdink.nl/phpbb/viewtopic.php?p=474#p474
#
# Goto right path
cd ~
# Check if access.log exist and copy it
if [ -f /var/log/apache2/access.log ]; then
cp /var/log/apache2/access.log Myfile.txt;
else
echo "Copy does not work!!!";
fi
# Subtract all ip addresses from copy into Myfile2.txt
while IFS='' read -r LINE || [ -n "${LINE}" ]; do cut -d' ' -f1; done < ~/Myfile.txt >> ~/Myfile2.txt
# Sort will unify the list to 'once' occurence and put output into ip-list-today.txt
sort ~/Myfile2.txt | uniq > ~/ip-list-$(date +%d%m%y).txt
# Check new file and remove old files
if [ -f ~/ip-list-$(date +%d%m%y).txt ]; then
echo "OK";
if [ -f ~/Myfile.txt ]; then
rm ~/Myfile.txt;
fi
if [ -f ~/Myfile2.txt ]; then
rm ~/Myfile2.txt;
fi
else
echo "Something went wrong!";
fi
#
# END
DG.
Re: Debian 12 Bookworm (Wordpress & phpBB)
Posted: 06 Feb 2024, 13:22
by admin
After 'Moving' the old web-servers to Debian 12, adjusted within Webmin MariaDB all links within WordPress to the correct URLs.
Also changed the URL's within the MariaDB for phpBB.
All this -of course- after a good backup!
On the newly Debian 12 machines restored the website folders, then the MariaDB's, with adjusted URLs.
Next all adjustments and afterwards test all.
For phpBB I tried to update the old machine -after the good backup- to the current version, but there were many messages that prevented me to continue an update or upgrade.
It seems that on the old phpBB server the used database was even not yet updated / correctly checked.
Most probably this caused the post-submit issues mentioned earlier on this board.
On the new Debian machine I installed the latest phpBB and within phpBB restored the old data, although URLs were adjusted...
phpBB read this data and did a check and adjusted the data to work on the newly installed phpBB version, all works fine now!