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:\weric
Recommended 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=ffi
and set:
ffi.enable=true
Edit 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 install
Initialize database structure
cd C:\weric\api
php artisan migrate --seed
Disable 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:443
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.domain:443
Setup 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 host
Start 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=opcache
Restart Apache service.
Last updated
Was this helpful?