Anonymous committed 6d2f7f9

Setup the front controller: configure Nginx and allow access from any host

Comments (0)

Files changed (2)

+# Set this to "app.php" to go into production mode:
+set $front_controller app_dev.php;
+index $front_controller;
+try_files $uri /web$uri /web/$front_controller$uri;
+location ~ ".+\.php($|/.*)" {
+   if ( -f /home/dotcloud/current/maintenance) {
+       return 503;
+   }
+   fastcgi_pass                     unix:/var/dotcloud/php5-fpm.sock;
+   include                          fastcgi_params;
+   include                          /home/dotcloud/current/\*fastcgi.conf;
+   fastcgi_split_path_info          ^(.+\.php)(/.+)$;
+   fastcgi_param PATH_INFO          $fastcgi_path_info;
+   fastcgi_param PATH_TRANSLATED    $document_root$fastcgi_path_info;
-// 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.
-if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
-    '',
-    '::1',
-))) {
-    header('HTTP/1.0 403 Forbidden');
-    exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
 require_once __DIR__.'/../app/bootstrap.php.cache';
 require_once __DIR__.'/../app/AppKernel.php';
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.