This microservice allows you to create logs from another application, e.g. Laravel applications and read them.
This is a simple interpretation of the logs microservice for everyone based on Lumen Framework and the GPL 3.0 license. Code under the GNU GPL license cannot be used in programs based on other licenses.
This microservice required users microservice:
and setup .env variable
AUTH_URL=127.0.0.1:8001/api/logs
If you can setup database, cp .en.example to .env.
The first is database instalation. You must use command:
php artisan migrate --seed
If you want generate documentation, please use this command:
php artisan scribe:generate
Use .htaccess:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
Virtual host setup:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName myapp.com
DocumentRoot /var/www/myapp.com/public/
<Directory /var/www/myapp.com/public/>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
<FilesMatch \.php$>
# Change this "proxy:unix:/path/to/fpm.socket"
# if using a Unix socket
#SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/myapp.com-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/myapp.com-access.log combined
</VirtualHost>
Use setup:
location / {
try_files $uri $uri/ /index.php?$query_string;
}
If you discover a security vulnerability within this solution, please send an e-mail to Adrian Stolarski at [email protected]. All security vulnerabilities will be promptly addressed.
This soulution is a GPL License.
The current solution uses middlewares:
$app->middleware([
App\Http\Middleware\DBTransaction::class,
App\Http\Middleware\LumenCors::class,
]);
If you want to use this software under a commercial license without publishing derivative sources, all you have to do is deposit $ 15 peer year to my paypal account: [email protected]