Hello I create my vagrant setup by link. And server is up i can manage to go my example.com/web/app_dev.php/controller/... and its works all well when i comment in my app_dev.php
// header('HTTP/1.0 403 Forbidden');
//exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
but when i want to go site example.com/web/controller/.... its display blank 404 error what might be the problem ? I do not use 127.0.0.1 insted of i use deflaut from setup 192.168.56.101
network:
private_network: 192.168.56.101
forwarded_port:
9DcLNVHGAeca:
host: '8889'
guest: '22'
What can i do to solve this ?
You can either add your local IP to the array in the app_dev.php
line 14:
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', 'YOUR IP'))
|| php_sapi_name() === 'cli-server')
)
or just uncomment the statements as you did in your question. It should be noted that the app_dev.php
should not be reachable on your production server anyways because it reveals sensitive information about your setup.