Mengelolah dengan perintah apache server di ubuntu 20.04

 



Langsung saja lihat di bawah ini:

UFW

  • 1. sudo ufw app list



2. sudo ufw allow 'Apache'

3. sudo ufw status

SYSTEMCTL dan CURL

1. sudo systemctl status apache2
2.
sudo systemctl stop apache2

3.
sudo systemctl start apache2
4. sudo systemctl restart apache2
To re-enable the service to start up at boot, type:
5. sudo systemctl enable apache2
6. sudo systemctl disable apache2
7. hostname -I =>>> melihat host yg di run
8. curl -4 icanhazip.com =>>> mengganti host ke doamin personal

Konfigurasi Direktori dan Akses untuk file html css dll

1. direktori default var/www/html
2. direktori kontrol folder ditasa /etc/apache2/sites-available/
misal ingin menambahkan konfigurasi baru:
3. sudo mkdir /var/www/isi
4. sudo chown -R $USER:$USER /var/www/isi
5. udo nano /var/www/isi/index.html
6. sudo nano /etc/apache2/sites-available/isi.conf
7. sudo a2ensite isi.conf
8. sudo a2dissite 000-default.conf =>> dissable sebelumnya
9. sudo apache2ctl configtest
10. jangan lupa install php apache dan mysql jika ingin menjalankan file php dan terhubung dengan databse sudo apt install php libapache2-mod-php php-mysql
sudo apt install php libapache2-mod-php php-mysql
10. sudo systemctl restart apache2



Sumber: Disini

0 Response to "Mengelolah dengan perintah apache server di ubuntu 20.04"

Posting Komentar