Jump to content

Apache:Virtual Host Sederhana: Difference between revisions

From Wiki
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
  <VirtualHost *:80>
  <VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    ServerAdmin webmaster@example.com
    DocumentRoot /var/www/example.com/public_html
   
   
    <Directory /var/www/example.com/public_html>
    ServerName example.com
        Options -Indexes +FollowSymLinks
    ServerAlias www.example.com
        AllowOverride All
    ServerAdmin webmaster@example.com
    </Directory>
    DocumentRoot /var/www/example.com/public_html
    <Directory /var/www/example.com/public_html>
        Options -Indexes +FollowSymLinks
        AllowOverride All
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
    CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined
   
   
    ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
    CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined
  </VirtualHost>
  </VirtualHost>
</syntaxhighlight>


==Source==
==Source==
*[https://websiteforstudents.com/how-to-set-up-an-apache-virtual-host-on-ubuntu-linux/ websiteforstudents.com]
*[https://geekrewind.com/how-to-set-up-an-apache-virtual-host-on-ubuntu-linux/ geekrewind.com]
[[Category:Tutorial]]
[[Category:Tutorial]]
[[Category:Linux]]
[[Category:Linux]]
[[Category:Server]]
[[Category:Server]]
[[Category:Apache]]
[[Category:Apache]]

Latest revision as of 08:57, 13 December 2025

<VirtualHost *:80>

   ServerName example.com
   ServerAlias www.example.com
   ServerAdmin webmaster@example.com
   DocumentRoot /var/www/example.com/public_html

   <Directory /var/www/example.com/public_html>
       Options -Indexes +FollowSymLinks
       AllowOverride All
   </Directory>

   ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
   CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined

</VirtualHost>

</syntaxhighlight>

Source