File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 21
21
.. code-block :: apache
22
22
23
23
<VirtualHost *:80>
24
- ServerName www.domain.tld
24
+ ServerName domain.tld
25
+ ServerAlias www.domain.tld
25
26
26
27
DocumentRoot /var/www/project/web
27
28
<Directory /var/www/project/web>
30
31
Order allow,deny
31
32
Allow from All
32
33
</Directory>
33
-
34
+
34
35
ErrorLog /var/log/apache2/project_error.log
35
36
CustomLog /var/log/apache2/project_access.log combined
36
37
</VirtualHost>
51
52
.. code-block :: nginx
52
53
53
54
server {
54
- server_name www.domain.tld;
55
+ server_name domain.tld www.domain.tld;
55
56
root /var/www/project/web;
56
57
57
58
location / {
64
65
rewrite ^(.*)$ /app.php/$1 last;
65
66
}
66
67
67
- location ~ ^/(app|app_dev)\.php(/|$) {
68
+ location ~ ^/(app|app_dev|config )\.php(/|$) {
68
69
fastcgi_pass unix:/var/run/php5-fpm.sock;
69
70
fastcgi_split_path_info ^(.+\.php)(/.*)$;
70
71
include fastcgi_params;
83
84
84
85
.. tip ::
85
86
86
- This executes **only ** ``app.php `` and ``app_dev.php `` in the web directory.
87
- All other files will be served as text. If you have other PHP files in
88
- your web directory, be sure to include them in the `` location `` block
89
- above.
87
+ This executes **only ** ``app.php ``, ``app_dev.php `` and `` config.php `` in
88
+ the web directory. All other files will be served as text. If you have
89
+ other PHP files in your web directory, be sure to include them in the
90
+ `` location `` block above.
90
91
91
92
.. _`Apache` : http://httpd.apache.org/docs/current/mod/core.html#documentroot
92
93
.. _`Nginx` : http://wiki.nginx.org/Symfony
You can’t perform that action at this time.
0 commit comments