From f64bc6b45962ffdee463307d70c57aad0b2e408b Mon Sep 17 00:00:00 2001 From: ProfM2 Date: Wed, 3 Jan 2018 16:31:44 -0700 Subject: [PATCH 1/3] Add environment variables --- setup/web_server_configuration.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup/web_server_configuration.rst b/setup/web_server_configuration.rst index 52939aae9bc..0e7e875d7d2 100644 --- a/setup/web_server_configuration.rst +++ b/setup/web_server_configuration.rst @@ -121,6 +121,11 @@ and increase web server performance: ErrorLog /var/log/apache2/project_error.log CustomLog /var/log/apache2/project_access.log combined + + SetEnv APP_ENV prod + SetEnv APP_SECRET + SetEnv DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name" + .. tip:: From 45c2939356cf030eb084ef6e02550aec3868239c Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 9 Jan 2018 15:36:04 +0100 Subject: [PATCH 2/3] Commented the env vars and mentioned that they are optional --- setup/web_server_configuration.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup/web_server_configuration.rst b/setup/web_server_configuration.rst index 0e7e875d7d2..09dbe386441 100644 --- a/setup/web_server_configuration.rst +++ b/setup/web_server_configuration.rst @@ -122,10 +122,10 @@ and increase web server performance: ErrorLog /var/log/apache2/project_error.log CustomLog /var/log/apache2/project_access.log combined - SetEnv APP_ENV prod - SetEnv APP_SECRET - SetEnv DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name" - + # optionally set the value of the environment variables used in the application + #SetEnv APP_ENV prod + #SetEnv APP_SECRET + #SetEnv DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name" .. tip:: From ab2c135c09ce2065c30fce9e10b74531ae194d31 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 9 Jan 2018 15:58:06 +0100 Subject: [PATCH 3/3] Added the env vars in the nginx config too --- setup/web_server_configuration.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup/web_server_configuration.rst b/setup/web_server_configuration.rst index 09dbe386441..ce0c962c6aa 100644 --- a/setup/web_server_configuration.rst +++ b/setup/web_server_configuration.rst @@ -298,6 +298,12 @@ The **minimum configuration** to get your application running under Nginx is: fastcgi_pass unix:/var/run/php7.1-fpm.sock; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; + + # optionally set the value of the environment variables used in the application + # fastcgi_param APP_ENV prod; + # fastcgi_param APP_SECRET ; + # fastcgi_param DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name"; + # When you are using symlinks to link the document root to the # current version of your application, you should pass the real # application path instead of the path to the symlink to PHP