as the comment sais
// This check prevents access to debug front controllers that are deployed by accident to production servers.
// Feel free to remove this, extend it, or make something more sophisticated.
remove this:
if (isset($_SERVER['HTTP_CLIENT_IP'])
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|| !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))
) {
header('HTTP/1.0 403 Forbidden');
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
this is just checking that your IP address is allowed. And allowed IP's are contained in this array array('127.0.0.1', 'fe80::1', '::1')
.
NOTE
in prod env you'll need to point to app.php
not app_dev.php
EDIT
in order to switch to PROD
env, run this command:
php app/console cache:warmup --env=prod --no-debug
--env=prod
will provide to point to app.php
instead of app_dev.php
--no-debug
will exit the debug mode like it won't show the Symfony debug bar in the browser..