symfony #contents

*Apacheの設定(バーチャルホスト) [#p4225068] &lt;apache_root&gt;/conf/extra/httpd-vhosts.conf <virtualhost *:80>

ServerName www.hogehoge.com
DocumentRoot "/home/hogehoge/myproject/web/frontend"
DirectoryIndex index.php
ErrorLog logs/www.hogehoge.error
CustomLog logs/www.hogehoge.access combined
<directory "/home/hogehoge/myproject/web/frontend">
  AllowOverride All
  Allow from All
 </directory>

</virtualhost> <virtualhost *:80>

ServerName dev.hogehoge.com
DocumentRoot "/home/hogehoge/myproject/web/backend"
DirectoryIndex backend.php
ErrorLog logs/dev.hogehoge.error
CustomLog logs/dev.hogehoge.access combined
<directory "/home/hogehoge/myproject/web/backend">
 AllowOverride All
 Allow from All
</directory>

</virtualhost>

*.htaccessの作成 [#ub959549] プロジェクトディレクトリのwebディレクトリにアプリケーション名でディレクトリを作成し、.htaccessを作成。

  web/
  +frontend/
  | --.htaccess
  +backend/
  |--.htaccess

*<application_name>.phpを修正 [#cb9e21fb] define('SF_ROOT_DIR', realpath(dirname(FILE).'/..')); → define('SF_ROOT_DIR', realpath(dirname(FILE).'/../..'));


Personal Tools