Reading
Add Comment
Anggap anda telah pun mempunyai konfigurasi asas berikut:
2. Apache2
Langkah berikut adalah secara arahan sahaja:
2. sudo touch /var/www/apapa.com/public_html/index.html
3. sudo chmod -Rv 755 /var/www/apaapa.com/
4. sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/site-available/apaapa.com.conf
5. sudo nano /etc/apache2/site-available/apaapa.com.conf
- <VirtualHost *:80>
ServerName apaapa.com
ServerAlias www.apaapa.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/apapa.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
6. sudo a2ensite apapa.com.conf
7. sudo service apache2 restart
8. sudo nano /etc/apache2/apache2.conf
- <Directory /var/www/apaapa.com/public_html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
9. sudo service apache2 restart
Selesai semua konfigurasi.
Jika lengkap menggunakan semua arahan yang disenaraikan sepatutnya Virtual Host anda berfungsi dengan baik. Kaedah ini tidak termasuk langkah konfigurasi NameServer.
CLI Linux Troubleshoot Ubuntu Web
0 comments:
Post a Comment