|
1 | 1 | ############################################
|
2 |
| -## Optional override of deployment mode. We recommend you use the |
3 |
| -## command bin/magento deploy:mode:set to switch modes instead |
4 |
| -# SetEnv MAGE_MODE default # or production or developer |
| 2 | +## overrides deployment configuration mode value |
| 3 | +## use command bin/magento deploy:mode:set to switch modes |
| 4 | + |
| 5 | +# SetEnv MAGE_MODE developer |
5 | 6 |
|
6 | 7 | ############################################
|
7 |
| -## Uncomment these lines for CGI mode. |
8 |
| -## Make sure to specify the correct cgi php binary file name |
| 8 | +## uncomment these lines for CGI mode |
| 9 | +## make sure to specify the correct cgi php binary file name |
9 | 10 | ## it might be /cgi-bin/php-cgi
|
10 | 11 |
|
11 | 12 | # Action php5-cgi /cgi-bin/php5-cgi
|
|
16 | 17 |
|
17 | 18 | # Options -MultiViews
|
18 | 19 |
|
19 |
| -## You might also need to add this line to php.ini |
| 20 | +## you might also need to add this line to php.ini |
20 | 21 | ## cgi.fix_pathinfo = 1
|
21 |
| -## If it still doesn't work, rename php.ini to php5.ini |
| 22 | +## if it still doesn't work, rename php.ini to php5.ini |
22 | 23 |
|
23 | 24 | ############################################
|
24 |
| -## This line is specific for 1and1 hosting |
| 25 | +## this line is specific for 1and1 hosting |
25 | 26 |
|
26 | 27 | #AddType x-mapp-php5 .php
|
27 | 28 | #AddHandler x-mapp-php5 .php
|
28 | 29 |
|
29 | 30 | ############################################
|
30 |
| -## Default index file |
| 31 | +## default index file |
31 | 32 |
|
32 | 33 | DirectoryIndex index.php
|
33 | 34 |
|
34 | 35 | <IfModule mod_php5.c>
|
35 | 36 |
|
36 | 37 | ############################################
|
37 |
| -## Adjust memory limit |
| 38 | +## adjust memory limit |
38 | 39 |
|
39 | 40 | php_value memory_limit 768M
|
40 | 41 | php_value max_execution_time 18000
|
41 | 42 |
|
42 | 43 | ############################################
|
43 |
| -## Disable automatic session start |
| 44 | +## disable automatic session start |
44 | 45 | ## before autoload was initialized
|
45 | 46 |
|
46 | 47 | php_flag session.auto_start off
|
47 | 48 |
|
48 | 49 | ############################################
|
49 |
| -## Enable resulting html compression |
| 50 | +## enable resulting html compression |
50 | 51 |
|
51 | 52 | #php_flag zlib.output_compression on
|
52 | 53 |
|
53 | 54 | ###########################################
|
54 |
| -## Disable user agent verification to not break multiple image upload |
| 55 | +## disable user agent verification to not break multiple image upload |
55 | 56 |
|
56 | 57 | php_flag suhosin.session.cryptua off
|
57 | 58 |
|
|
60 | 61 | <IfModule mod_php7.c>
|
61 | 62 |
|
62 | 63 | ############################################
|
63 |
| -## Adjust memory limit |
| 64 | +## adjust memory limit |
64 | 65 |
|
65 | 66 | php_value memory_limit 768M
|
66 | 67 | php_value max_execution_time 18000
|
67 | 68 |
|
68 | 69 | ############################################
|
69 |
| -## Disable automatic session start |
| 70 | +## disable automatic session start |
70 | 71 | ## before autoload was initialized
|
71 | 72 |
|
72 | 73 | php_flag session.auto_start off
|
73 | 74 |
|
74 | 75 | ############################################
|
75 |
| -## Enable resulting html compression |
| 76 | +## enable resulting html compression |
76 | 77 |
|
77 | 78 | #php_flag zlib.output_compression on
|
78 | 79 |
|
79 | 80 | ###########################################
|
80 |
| -## Disable user agent verification to not break multiple image upload |
| 81 | +## disable user agent verification to not break multiple image upload |
81 | 82 |
|
82 | 83 | php_flag suhosin.session.cryptua off
|
83 | 84 |
|
84 | 85 | </IfModule>
|
85 | 86 |
|
86 | 87 | <IfModule mod_security.c>
|
87 | 88 | ###########################################
|
88 |
| -## Disable POST processing to not break multiple image upload |
| 89 | +## disable POST processing to not break multiple image upload |
89 | 90 |
|
90 | 91 | SecFilterEngine Off
|
91 | 92 | SecFilterScanPOST Off
|
|
94 | 95 | <IfModule mod_deflate.c>
|
95 | 96 |
|
96 | 97 | ############################################
|
97 |
| -## Enable apache served files compression |
| 98 | +## enable apache served files compression |
98 | 99 | ## http://developer.yahoo.com/performance/rules.html#gzip
|
99 | 100 |
|
100 | 101 | # Insert filter on all content
|
|
122 | 123 | <IfModule mod_ssl.c>
|
123 | 124 |
|
124 | 125 | ############################################
|
125 |
| -## Make HTTPS env vars available for CGI mode |
| 126 | +## make HTTPS env vars available for CGI mode |
126 | 127 |
|
127 | 128 | SSLOptions StdEnvVars
|
128 | 129 |
|
129 | 130 | </IfModule>
|
130 | 131 |
|
131 | 132 | ############################################
|
132 |
| -## Workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other) |
| 133 | +## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other) |
133 | 134 | ## Please, set it on virtual host configuration level
|
134 | 135 |
|
135 | 136 | ## SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
|
138 | 139 | <IfModule mod_rewrite.c>
|
139 | 140 |
|
140 | 141 | ############################################
|
141 |
| -## Enable rewrites |
| 142 | +## enable rewrites |
142 | 143 |
|
143 | 144 | Options +FollowSymLinks
|
144 | 145 | RewriteEngine on
|
145 | 146 |
|
146 | 147 | ############################################
|
147 |
| -## You can put here your magento root folder |
| 148 | +## you can put here your magento root folder |
148 | 149 | ## path relative to web root
|
149 | 150 |
|
150 | 151 | #RewriteBase /magento/
|
151 | 152 |
|
152 | 153 | ############################################
|
153 |
| -## Workaround for HTTP authorization |
| 154 | +## workaround for HTTP authorization |
154 | 155 | ## in CGI environment
|
155 | 156 |
|
156 | 157 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
|
162 | 163 | RewriteRule .* - [L,R=405]
|
163 | 164 |
|
164 | 165 | ############################################
|
165 |
| -## Redirect for mobile user agents |
| 166 | +## redirect for mobile user agents |
166 | 167 |
|
167 | 168 | #RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
|
168 | 169 | #RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
|
169 | 170 | #RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]
|
170 | 171 |
|
171 | 172 | ############################################
|
172 |
| -## Never rewrite for existing files, directories and links |
| 173 | +## never rewrite for existing files, directories and links |
173 | 174 |
|
174 | 175 | RewriteCond %{REQUEST_FILENAME} !-f
|
175 | 176 | RewriteCond %{REQUEST_FILENAME} !-d
|
176 | 177 | RewriteCond %{REQUEST_FILENAME} !-l
|
177 | 178 |
|
178 | 179 | ############################################
|
179 |
| -## Rewrite everything else to index.php |
| 180 | +## rewrite everything else to index.php |
180 | 181 |
|
181 | 182 | RewriteRule .* index.php [L]
|
182 | 183 |
|
|
205 | 206 |
|
206 | 207 | ###########################################
|
207 | 208 | ## Deny access to root files to hide sensitive application information
|
208 |
| - RedirectMatch 404 /\.git |
| 209 | + RedirectMatch 403 /\.git |
209 | 210 |
|
210 | 211 | <Files composer.json>
|
211 | 212 | order allow,deny
|
|
280 | 281 | deny from all
|
281 | 282 | </Files>
|
282 | 283 |
|
| 284 | +# For 404s and 403s that aren't handled by the application, show plain 404 response |
| 285 | +ErrorDocument 404 /pub/errors/404.php |
| 286 | +ErrorDocument 403 /pub/errors/404.php |
| 287 | + |
283 | 288 | ################################
|
284 | 289 | ## If running in cluster environment, uncomment this
|
285 | 290 | ## http://developer.yahoo.com/performance/rules.html#etags
|
|
0 commit comments