Apache2
sudo apt update
sudo apt install apache2
sudo ufw app list
sudo ufw allow 'WWW'
sudo ufw status
sudo systemctl status apache2
hostname -ISpráva procesů
sudo systemctl stop apache2
sudo systemctl start apache2
sudo systemctl restart apache2
sudo systemctl reload apache2
sudo systemctl disable apache2
sudo systemctl enable apache2Vytvoření webového adresáře
sudo mkdir -p /var/www/html
sudo chown -R $USER:$USER /var/www/html
sudo chmod -R 755 /var/www/html
nano /var/www/html/index.html
sudo nano /etc/apache2/sites-available/html.conf<VirtualHost *:80>
ServerAdmin admin@gdanyx.eu
ServerName gdany.eu
ServerAlias www.gdanyx.eu
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>sudo a2ensite html.conf
sudo a2dissite 000-default.conf
sudo apache2ctl configtestAH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OKsudo systemctl restart apache2Last updated