|
339 | 339 | </Directory> |
340 | 340 | <Directory {tmpl_var name='web_document_root_www'}> |
341 | 341 | <FilesMatch "\.php[345]?$"> |
342 | | - SetHandler php5-fcgi |
| 342 | + <tmpl_if name='apache_version' op='>=' value='2.4' format='version'> |
| 343 | + <If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}"> |
| 344 | + SetHandler php5-fcgi |
| 345 | + </If> |
| 346 | + <tmpl_else> |
| 347 | + SetHandler php5-fcgi |
| 348 | + </tmpl_if> |
343 | 349 | </FilesMatch> |
344 | 350 | </Directory> |
345 | 351 | <Directory {tmpl_var name='web_document_root'}> |
346 | 352 | <FilesMatch "\.php[345]?$"> |
347 | | - SetHandler php5-fcgi |
| 353 | + <tmpl_if name='apache_version' op='>=' value='2.4' format='version'> |
| 354 | + <If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}"> |
| 355 | + SetHandler php5-fcgi |
| 356 | + </If> |
| 357 | + <tmpl_else> |
| 358 | + SetHandler php5-fcgi |
| 359 | + </tmpl_if> |
348 | 360 | </FilesMatch> |
349 | 361 | </Directory> |
350 | 362 | Action php5-fcgi /php5-fcgi virtual |
|
361 | 373 | #ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ fcgi://127.0.0.1:<tmpl_var name='fpm_port'><tmpl_var name='web_document_root'>/$1 |
362 | 374 | <Directory {tmpl_var name='web_document_root'}> |
363 | 375 | <FilesMatch "\.php[345]?$"> |
364 | | - SetHandler "proxy:fcgi://127.0.0.1:<tmpl_var name='fpm_port'>" |
| 376 | + <tmpl_if name='apache_version' op='>=' value='2.4' format='version'> |
| 377 | + <If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}"> |
| 378 | + SetHandler "proxy:fcgi://127.0.0.1:<tmpl_var name='fpm_port'>" |
| 379 | + </If> |
| 380 | + <tmpl_else> |
| 381 | + SetHandler "proxy:fcgi://127.0.0.1:<tmpl_var name='fpm_port'>" |
| 382 | + </tmpl_if> |
365 | 383 | </FilesMatch> |
366 | 384 | </Directory> |
367 | 385 | </tmpl_if> |
368 | 386 | <tmpl_if name='use_socket'> |
369 | 387 | #ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix://<tmpl_var name='fpm_socket'>|fcgi://localhost/<tmpl_var name='web_document_root'>/$1 |
370 | 388 | <Directory {tmpl_var name='web_document_root'}> |
371 | 389 | <FilesMatch "\.php[345]?$"> |
372 | | - SetHandler "proxy:unix:<tmpl_var name='fpm_socket'>|fcgi://localhost" |
| 390 | + <tmpl_if name='apache_version' op='>=' value='2.4' format='version'> |
| 391 | + <If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}"> |
| 392 | + SetHandler "proxy:unix:<tmpl_var name='fpm_socket'>|fcgi://localhost" |
| 393 | + </If> |
| 394 | + <tmpl_else> |
| 395 | + SetHandler "proxy:unix:<tmpl_var name='fpm_socket'>|fcgi://localhost" |
| 396 | + </tmpl_if> |
373 | 397 | </FilesMatch> |
374 | 398 | </Directory> |
375 | 399 | </tmpl_if> |
|
0 commit comments