From c461124eda72b716318f807f56fce003219cf66c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 12 Mar 2022 17:32:07 +0100 Subject: [PATCH] Fix --- conf/.env.example | 54 ++++++++++++++++++----------------------------- conf/nginx.conf | 5 ++--- 2 files changed, 22 insertions(+), 37 deletions(-) diff --git a/conf/.env.example b/conf/.env.example index 2a53aaf..3f5e94d 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -1,36 +1,22 @@ -# This file is a "template" of which env vars need to be defined for your application -# Copy this file to .env file for development, create environment variables when deploying to production -# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration +# Configure your database connection and set the correct server version: +# for MySQL "serverVersion=5.7" and for MariaDB "serverVersion=mariadb-10.5.8" +DATABASE_URL=mysql://__DB_USER__:__DB_PWD__@127.0.0.1:3306/__DB_NAME__?charset=utf8&serverVersion=mariadb-10.5.12 -###> symfony/framework-bundle ### -APP_ENV=prod -APP_SECRET=__RANDOM_KEY__ -#TRUSTED_PROXIES=127.0.0.1,127.0.0.2 -#TRUSTED_HOSTS=localhost,example.com -###< symfony/framework-bundle ### - -###> doctrine/doctrine-bundle ### -# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url -# For a MySQL database, use: "mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=10.2.12&charset=utf8" -# For a MariaDB database, use: "mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=mariadb-10.2.12" -# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data/kimai.sqlite" -# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml -DATABASE_URL=mysql://__DB_USER__:__DB_PWD__@127.0.0.1:3306/__DB_NAME__ -# DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/kimai.sqlite -###< doctrine/doctrine-bundle ### - -###> nelmio/cors-bundle ### -CORS_ALLOW_ORIGIN=^https?://localhost(:[0-9]+)?$ -###< nelmio/cors-bundle ### - -### Email configuration -# SMTP: smtp://localhost:25?encryption=&auth_mode= -# Google: gmail://username:password@default -# Amazon: ses://ACCESS_KEY:SECRET_KEY@default?region=eu-west-1 -# Mailchimp: mandrill://KEY@default -# Mailgun: mailgun://KEY:DOMAIN@default -# Postmark: postmark://ID@default -# Sendgrid: sendgrid://KEY@default -# Disable emails: null://null -MAILER_URL=smtp://localhost:25?encryption=&auth_mode= +# Email will be sent with this address as sender MAILER_FROM=admin@__DOMAIN__ + +# Email connection (disabled by default) more info at https://www.kimai.org/documentation/emails.html +MAILER_URL=smtp://localhost:25?encryption=&auth_mode= + +# do not change, unless you are developing for Kimai +APP_ENV=prod + +# should be changed to a unique character sequence +APP_SECRET=__RANDOM_KEY__ + +# unlikely, that you need to change this one +CORS_ALLOW_ORIGIN=^https?://localhost(:[0-9]+)?$ + +# Running behind reverse proxies? Use those: +TRUSTED_PROXIES=127.0.0.1 +TRUSTED_HOSTS=localhost,__DOMAIN__ diff --git a/conf/nginx.conf b/conf/nginx.conf index ebd5089..bbb2da6 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,4 @@ -#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { +location / { # Path to source alias __FINALPATH__/public/; @@ -9,7 +8,7 @@ location __PATH__/ { # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file #client_max_body_size 50M; - try_files $uri $uri/ /__PATH__/index.php; + try_files $uri $uri/ /index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;