Tugas Akhir‎ > ‎Pengumuman TA‎ > ‎

XAMPP VirtualHost

posted 12 Jul 2012, 21:03 by Muhammad Jazman   [ updated 12 Jul 2012, 21:08 ]
bagi mahasiswa Teknik Informatika Politeknik Kampar yang sedang melaksanakan Tugas Akhir, ada baiknya memahami konsep VirtualHost di Apache2

berikut contoh:

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin muhammad@jazman.keren.la
    DocumentRoot "E:/xampp/htdocs"
    ServerName localhost
    ServerAlias www.localhost
    ErrorLog "logs/localhost.error.log"
    CustomLog "logs/localhost.access.log" combined
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin muhammad@jazman.keren.la
    DocumentRoot "E:/xampp/vhosts/elearning.tif.poltek-kampar.ac.id/public_html"
    ServerName elearning.tif.poltek-kampar.ac.id
    ServerAlias www.elearning.tif.poltek-kampar.ac.id
    ErrorLog "E:/xampp/vhosts/elearning.tif.poltek-kampar.ac.id/logs/error.log"
    CustomLog "E:/xampp/vhosts/elearning.tif.poltek-kampar.ac.id/logs/access.log" combined

    php_flag log_errors on
    php_flag display_errors off
    #php_value error_reporting 6143
    php_value error_log E:/xampp/vhosts/elearning.tif.poltek-kampar.ac.id/logs/php.error.log

</VirtualHost>

<Directory "E:/xampp/vhosts/elearning.tif.poltek-kampar.ac.id/public_html">
    Options Indexes FollowSymLinks Includes ExecCGI

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    Order allow,deny
    Allow from all

</Directory>

dan jangan lupa untuk mengubah file host kalian untuk testing di komputer lokal (laptop)
C:\windows\system32\drivers\etc\host
tambahkan 
127.0.0.1 elearning.tif.poltek-kampar.ac.id



Comments