Skip to content

Commit d5e1f83

Browse files
committed
[symfony#1678] Tweaks to new article about overriding directory structures
1 parent a64780f commit d5e1f83

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

cookbook/configuration/environments.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ includes the following:
340340

341341
.. note::
342342

343-
You can easilly change the directory location and name, for more information
343+
You can easily change the directory location and name. For more information
344344
read the article :doc:`/cookbook/configuration/override_dir_structure`.
345345

346346

cookbook/configuration/override_dir_structure.rst

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ the location of the cache directory to ``app/{environment}/cache``.
4848

4949
.. warning::
5050

51-
You should keep the ``cache`` directory different for each environment,
52-
otherwise some unexpected behaviour can happen as a different environment
53-
means different config files and those are cached, so the cached data
54-
is different.
51+
You should keep the ``cache`` directory different for each environment,
52+
otherwise some unexpected behaviour may happen. Each environment generates
53+
its own cached config files, and so each needs its own directory to store
54+
those cache files.
5555

5656
Override the ``logs`` directory
5757
-------------------------------
@@ -73,23 +73,31 @@ method::
7373
}
7474
}
7575

76-
We have changed location of the directory to ``app/{environment}/logs``.
76+
Here we have changed the location of the directory to ``app/{environment}/logs``.
7777

7878
Override the ``web`` directory
7979
------------------------------
8080

81-
Some shared hosting require to rename the ``web`` directory to ``public_html``
82-
and move this directory to the apache root. You can simply rename the directory:
83-
The only thing you need to check is if the path to the ``app`` directory
84-
is still right in ``app.php`` or ``app_dev.php``. For instance: If we move
85-
the ``web`` directory one map up we need to add ``Symfony`` (the name of
86-
your Symfony installation directory) to the path::
81+
If you need to rename or move your ``web`` directory, the only thing you
82+
need to guarantee is that the path to the ``app`` directory is still correct
83+
in your ``app.php`` and ``app_dev.php`` front controllers. If you simply
84+
renamed the directory, you're fine. But if you moved it in some way, you
85+
may need to modify the paths inside these files::
8786

8887
require_once __DIR__.'/../Symfony/app/bootstrap.php.cache';
8988
require_once __DIR__.'/../Symfony/app/AppKernel.php';
90-
89+
90+
.. tip::
91+
92+
Some shared hosts have a ``public_html`` web directory root. Renaming
93+
your web directory from ``web`` to ``public_html`` is one way to make
94+
your Symfony project work on your shared host. Another way is to deploy
95+
your application to a directory outside of your web root, delete your
96+
``public_html`` directory, and then replace it with a symbolic link to
97+
the ``web`` in your project.
98+
9199
.. note::
92-
100+
93101
If you use the AsseticBundle you need to configure this, so it can use
94102
the correct ``web`` directory:
95103

0 commit comments

Comments
 (0)