<VirtualHost *:80>
    #ServerName: The domain that should match for this virtual host configuration. This should be your domain name.
    ServerName tonkas.hopto.org

    #ServerAlias: All other domains that should match for this virtual host as well, such as the www subdomain.
    ServerAlias tonkas.hopto.org

    ServerAdmin webmaster@example.com

    #DocumentRoot: The directory from which Apache will serve the domain files.
    DocumentRoot /var/www/html/tonkas

    #set an alias to tonkas.hopto.org/track_script that is in user tracks home folder
    Alias /track_script/ /home/tracks/track_script/

    #set second alias to tonkas.hopto.org/tracks in the user tracks home folder
    Alias /tracks/ /home/tracks/tracks/

    #sets another alias to tonkas.hopto.org/upload
    Alias /upload/ /home/tracks/tracks/upload/

    <Directory /home/tracks/track_script>
	Options -Indexes
	AllowOverride All
	Require all granted
    </Directory>

    <Directory /home/tracks/tracks>
	Options -Indexes
	AllowOverride All
	Require all granted
    </Directory>

    <Directory /home/tracks/tracks/upload>
	Options -Indexes
	AllowOverride All
	Require all granted
    </Directory>

    <Directory /var/www/html/tonkas>
        #Options: This directive controls which server features are available in a specific directory.
        #-Indexes: Prevents directory listings.
        #FollowSymLinks: This option tells your web server to follow the symbolic links.
        Options +Indexes +FollowSymLinks
        #AllowOverride: Specifies which directives declared in the .htaccess file can override the configuration directives.
        AllowOverride All
    </Directory>

    #ErrorLog, CustomLog: Specifies the location for log files.
    ErrorLog ${APACHE_LOG_DIR}/tonkas-error.log
    CustomLog ${APACHE_LOG_DIR}/tonkas-access.log combined
</VirtualHost>
