<VirtualHost *:8000>
        DocumentRoot /var/www/html/ada/public
        # ServerName um.localhost
        <Directory /var/www/html/ada/public>
            Options -Indexes +FollowSymLinks +MultiViews
            AllowOverride All
            Require all granted
        </Directory>
        
        <FilesMatch \.php$>
            # Apache 2.4.10+ can proxy to unix socket
            SetHandler "proxy:fcgi://wpn_php:9000"
        </FilesMatch>
</VirtualHost>
<VirtualHost *:80>
    ServerName staging.wpn.thedigitalbox.com
    DocumentRoot /var/www/html/push-notification-service-v2/public
    <Directory /var/www/html/push-notification-service-v2/public>
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
    </Directory>
        
    <FilesMatch \.php$>
        # Apache 2.4.10+ can proxy to unix socket
        SetHandler "proxy:fcgi://wpn_php:9000"
    </FilesMatch>

    ErrorLog ${APACHE_LOG_DIR}/error_wpnstaging.log
    CustomLog ${APACHE_LOG_DIR}/access_wpnstaging.log combined

    RewriteEngine on
    RewriteCond %{SERVER_NAME} =staging.wpn.thedigitalbox.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName staging.wpn.thedigitalbox.com
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/push-notification-service-v2/public
        <Directory /var/www/html/push-notification-service-v2/public>
            AllowOverride All
            Order allow,deny
            Allow from all
            Require all granted
        </Directory>
        
        <FilesMatch \.php$>
            # Apache 2.4.10+ can proxy to unix socket
            SetHandler "proxy:fcgi://wpn_php:9000"
        </FilesMatch>

        ErrorLog ${APACHE_LOG_DIR}/error_wpnstaging.log
        CustomLog ${APACHE_LOG_DIR}/access_wpnstaging.log combined

        SSLCertificateFile /etc/letsencrypt/live/staging.wpn.thedigitalbox.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/staging.wpn.thedigitalbox.com/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf
    </VirtualHost>
</IfModule>