This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you want to install Apache module such as mod_headers, you need to issue the a2enmod command | |
sudo a2enmod <module_name> | |
# Like | |
sudo a2enmod headers | |
sudo a2enmod rewrite | |
sudo a2enmod alias | |
# Restart Apache Web Server | |
sudo service apache2 restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'rewrite' => [ | |
'slug' => '/', | |
'with_front' => false | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm /etc/resolv.conf && sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf | |
systemctl restart systemd-resolved.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing Certbot | |
sudo apt install certbot python3-certbot-apache | |
# Checking Apache VHost Configuration | |
sudo nano /etc/apache2/sites-available/your_domain.conf | |
# validate your changes | |
sudo apache2ctl configtest | |
# reload Apache to load the new configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install vsftpd | |
sudo apt install vsftpd | |
# launch the service and enable it at startup | |
sudo systemctl start vsftpd | |
sudo systemctl enable vsftpd | |
# Create a backup copy of the default configuration file | |
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf_default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add PPA repository | |
sudo apt update | |
sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common -y | |
sudo add-apt-repository ppa:ondrej/php | |
# sudo apt update | |
# install | |
sudo apt install php8.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ADD username to group | |
sudo usermod -aG www-data iain | |
addgroup www-data | |
# | |
sudo chown -R www-data:www-data /var/www/example.com/public_html | |
sudo chmod -R 770 /var/www/example.com/public_html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create the Directory Structure | |
sudo mkdir -p /var/www/example.com/public_html | |
# Grant Permissions | |
sudo chown -R $USER:$USER /var/www/example.com/public_html | |
sudo chmod -R 755 /var/www | |
# Create New Virtual Host File | |
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install the build-essential packages | |
sudo apt-get install build-essential | |
# Write a C program | |
# save the file with .c extension | |
# Compile the C program with gcc Compiler | |
gcc [programName].c -o programName | |
# Run the program |