<VirtualHost *:80>
	ServerAdmin contact@localhost
	ServerName adz-veeva.prod.stream-up.local
	ServerAlias *.prod.stream-up.local
	DocumentRoot /var/www/html/public/

    <IfModule dir_module>
        DirectoryIndex index.html index.php
    </IfModule>

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteCond %{SERVER_PORT} 80
        RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,QSA]
    </IfModule>

    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

	<Directory /var/www/html/public/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    php_value upload_max_filesize "500M"
    php_value post_max_size "500M"
    php_value max_input_time "259200"
    php_value max_input_time "259200"

    php_value default_charset ISO-8859-1
    AddDefaultCharset ISO-8859-1

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile "/etc/ssl/prod.stream-up.local.crt"
    SSLCertificateKeyFile "/etc/ssl/prod.stream-up.local.key"

    ServerAdmin contact@localhost
	ServerName adz-veeva.prod.stream-up.local
    ServerAlias *.prod.stream-up.local
    DocumentRoot /var/www/html/public/

    <IfModule dir_module>
        DirectoryIndex index.html index.php
    </IfModule>

    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

    <Directory /var/www/html/public/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    <FilesMatch "\.(cgi|shtml|phtml|php)$">
        SSLOptions +StdEnvVars
    </FilesMatch>

    <Directory /usr/lib/cgi-bin>
        SSLOptions +StdEnvVars
    </Directory>

    php_value upload_max_filesize "500M"
    php_value post_max_size "500M"
    php_value max_input_time "259200"
    php_value max_input_time "259200"

    php_value default_charset ISO-8859-1
    AddDefaultCharset ISO-8859-1

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
