After setting system time, I discovered that mysql and php services didn’t also update the timezone settings. Here’s how to make sure they also reflect the correct timezone.
First locate all the php.ini files in /etc
cd /etc/
find . | grep php.ini
./php/7.4/apache2/php.ini
./php/7.4/cli/php.ini
now edit these files and add the timezone info
nano ./php/7.4/apache2/php.ini
add this to the [Date] block:
[Date]
date.timezone = "America/New_York"
For mysqld portion, first copy timezone data into mysql tables:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
Say you want to create a simple password protected folder in order to share some sensitive documents or what have you. Using apache2 and HTTP Basic Auth, this can be accomplished in only a few commands.
An Example of simple HTTP Basic Auth Login
First, create a folder in your web directory.
sudo mkdir /var/www/html/protected
Then, you will want to setup the username/password you want to use for the login.