10000 Change web directory with public directory · symfony/symfony-docs@2ee2ce2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ee2ce2

Browse files
sgautiermichaelperrin
authored andcommitted
Change web directory with public directory
1 parent 4d5ebc4 commit 2ee2ce2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

setup/web_server_configuration.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ The **minimum configuration** to get your application running under Apache is:
4242
ServerName domain.tld
4343
ServerAlias www.domain.tld
4444
45-
DocumentRoot /var/www/project/web
46-
<Directory /var/www/project/web>
45+
DocumentRoot /var/www/project/public
46+
<Directory /var/www/project/public>
4747
AllowOverride All
4848
Order Allow,Deny
4949
Allow from All
@@ -73,8 +73,8 @@ and increase web server performance:
7373
ServerName domain.tld
7474
ServerAlias www.domain.tld
7575
76-
DocumentRoot /var/www/project/web
77-
<Directory /var/www/project/web>
76+
DocumentRoot /var/www/project/public
77+
<Directory /var/www/project/public>
7878
AllowOverride None
7979
Order Allow,Deny
8080
Allow from All
@@ -123,7 +123,7 @@ Hence, you need to modify your ``Directory`` permission settings as follows:
123123

124124
.. code-block:: apache
125125
126-
<Directory /var/www/project/web>
126+
<Directory /var/www/project/public>
127127
Require all granted
128128
# ...
129129
</Directory>
@@ -193,8 +193,8 @@ use the ``SetHandler`` directive to pass requests for PHP files to PHP FPM:
193193
# regular expression must be changed accordingly:
194194
# ProxyPassMatch ^/path-to-app/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/project/public/$1
195195
196-
DocumentRoot /var/www/project/web
197-
<Directory /var/www/project/web>
196+
DocumentRoot /var/www/project/public
197+
<Directory /var/www/project/public>
198198
# enable the .htaccess rewrites
199199
AllowOverride All
200200
Require all granted
@@ -228,8 +228,8 @@ should look something like this:
228228
Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi
229229
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -host 127.0.0.1:9000 -pass-header Authorization
230230
231-
DocumentRoot /var/www/project/web
232-
<Directory /var/www/project/web>
231+
DocumentRoot /var/www/project/public
232+
<Directory /var/www/project/public>
233233
# enable the .htaccess rewrites
234234
AllowOverride All
235235
Order Allow,Deny
@@ -264,7 +264,7 @@ The **minimum configuration** to get your application running under Nginx is:
264264
265265
server {
266266
server_name domain.tld www.domain.tld;
267-
root /var/www/project/web;
267+
root /var/www/project/public;
268268
269269
location / {
270270
# try to serve file directly, fallback to index.php

0 commit comments

Comments
 (0)
0