Jump to content

Apache:Virtual Host Sederhana: Difference between revisions

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



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