Install
Requirements
Instance type when DB on separate instance
t3.micro - 2 vCPU, 1 GiB RAM
Instance type when DB on same instance
t3.medium - 2 vCPU, 4 GiB RAM
Storage
At least 30 GB
Software
Windows Server 2022 Datacenter (version 21H2)
Required
Optional
Versions
XAMPP with PHP 8.2 (64-bit)
VC++ Redist 14 (64-bit)
Setup
Clone git repository
git clone --single-branch https://gitlab.com/rechtlogischshared/za/weric.git C:\wericRecommended target path: C:\weric
Set DocumentRoot, Directory and comment out default port Listen and ServerName
Inside C:\xampp\apache\conf\httpd.conf change path to C:/weric/api/public
DocumentRoot "C:/weric/api/public"
<Directory "C:/weric/api/public">Enable FFI module for PHP
Uncomment:
extension=ffiand set:
ffi.enable=trueEdit PATH
Search for Edit the system environment variables and add C:\weric\api\public\libs\windows to user environment variables (cf. screenshot)

Requires to restart dependent services and UI applications so the newly set PATH is utilized by applications.
Copy .env.example
Create .env based on .env.example inside C:\weric\api\ and adjust following variables:
API_TOKEN=YOUR_API_TOKEN
APP_ENV=development # change to "production" when going productive
APP_URL=https://your.host
CERTIFICATE_FILE="your.pfx" # set to "dvccsap11002.dll" for DATEV stick or comment out to use "test-softorg-pse.pfx"
DB_HOST=HOST
DB_PASSWORD="PASSWORD"Install dependencies
cd C:\weric\api
composer installInitialize database structure
cd C:\weric\api
php artisan migrate --seedDisable virus Real-time protection or exclude following folders
C:\xampp\
C:\weric\api\(Optional: SSL certificate)
Install Certbot and run commands mentioned there.
Allow traffic on port 80 in AWS Console and in Windows Firewall.
Allow traffic on port 443 in AWS Console and in Windows Firewall.
Edit C:\xampp\apache\conf\extra\httpd-ssl.conf
DocumentRoot "C:/weric/api/public"
ServerName host.domain
ServerAdmin [email protected]
SSLCertificateFile "C:\Certbot\live\host.domain\fullchain.pem"
SSLCertificateKeyFile "C:\Certbot\live\host.domain\privkey.pem"Inside C:\xampp\apache\conf\httpd.conf you should disable default Port 80 (in case occupied Certbot can't renew certificates) and change ServerName
#Listen 80
ServerName host.domainSetup task scheduler for automatic renewal (with pre- and post-hook).
(Optional: Run as service)
Add C:\weric\api\public\libs\windows to system environment variables.
Edit C:\xampp\xampp-control.ini to enable services:
[EnableServices]
Apache=1
MySQL=1 # if database on the same hostStart XAMPP Control Panel and click box left to Apache and MySQL to install services.
Disable autostart options in XAMPP Control Panel.
(Optional: Enable PHP OPcache)
Increases performance (cf. PHP documentation).
Edit C:\xampp\php\php.ini and uncomment:
zend_extension=opcacheRestart Apache service.
Last updated