php - Symfony2 moving to demo bundle over to production -


i going thorough quick start symfony 2 , i'm getting quite confused. have following directory structure after unpacking symfony2 (as in documentation):

/var/www/ <- web root directory     symfony/ <- unpacked archive         app/             cache/             config/             logs/             resources/         bin/         src/             acme/                 demobundle/                     controller/                     resources/                     ...         vendor/             symfony/             doctrine/             ...         web/             app.php             ... 

i've got demo working @ <host>/symfony2/web/app_dev.php/demo/welcome/james. far good.

i know can't use apache's mod_rewrite app_dev.php wondering if give me step step to:

  • moving demobundle on using app.php (because <host>/symfony2/web/app.php/demo/hello/james not working. it's throwing symfony error. swear haven't touched thing. i'm @ bottom of first page of tutorial)
  • keeping development toolbar when using app.php (do cut web_profiler: config/config_dev.yml?)
  • setting symfony2 outside of web route (best thing security presume?!?) (should have have soft link /var/www/index.php pointing /home/<name>/symfony2/web/app.php?)
  • now i'm on production version able go <host>/demo/welcome/james, if not, why not? (i have apache's mod_rewrite installed) (i'd bit working)

(i had same problem learning django, information absorb @ first.)

  • the demo not meant run in production. however, if wish learning purposes, move routes _demo , _demo_secured app/config/routing_dev.yml app/config/routing.yml.

  • using web profiler in production again not sensible. site visitors must not access such information. reason why there 2 separate front controllers (app.php , app_dev.php). they've both set different purposes.

  • the best practice in setting web server have web root point ./web.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -