Skip to content

Commit abcbe7a

Browse files
committed
minor #8974 Add environment variables (ProfM2, javiereguiluz)
This PR was merged into the 4.0 branch. Discussion ---------- Add environment variables Add server environment variables, specifically for production use. Commits ------- ab2c135 Added the env vars in the nginx config too 45c2939 Commented the env vars and mentioned that they are optional f64bc6b Add environment variables
2 parents 756cfb0 + ab2c135 commit abcbe7a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

setup/web_server_configuration.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ and increase web server performance:
121121
</Directory>
122122
ErrorLog /var/log/apache2/project_error.log
123123
CustomLog /var/log/apache2/project_access.log combined
124+
125+
# optionally set the value of the environment variables used in the application
126+
#SetEnv APP_ENV prod
127+
#SetEnv APP_SECRET <app-secret-id>
128+
#SetEnv DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name"
124129
</VirtualHost>
125130
126131
.. tip::
@@ -293,6 +298,12 @@ The **minimum configuration** to get your application running under Nginx is:
293298
fastcgi_pass unix:/var/run/php7.1-fpm.sock;
294299
fastcgi_split_path_info ^(.+\.php)(/.*)$;
295300
include fastcgi_params;
301+
302+
# optionally set the value of the environment variables used in the application
303+
# fastcgi_param APP_ENV prod;
304+
# fastcgi_param APP_SECRET <app-secret-id>;
305+
# fastcgi_param DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name";
306+
296307
# When you are using symlinks to link the document root to the
297308
# current version of your application, you should pass the real
298309
# application path instead of the path to the symlink to PHP

0 commit comments

Comments
 (0)