parent
8e28fff524
commit
f49c8c02db
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
namespace Icinga\Config\Webserver;
|
||||
|
||||
/**
|
||||
* Create nginx webserver configuration
|
||||
*/
|
||||
class Nginx extends Webserver
|
||||
{
|
||||
/**
|
||||
* Specific template
|
||||
*
|
||||
* @return array|string
|
||||
*/
|
||||
protected function getTemplate()
|
||||
{
|
||||
return array(
|
||||
'location ~ ^{webPath}/index\.php(.*)$ {',
|
||||
' # fastcgi_pass 127.0.0.1:9000;',
|
||||
' fastcgi_pass unix:/var/run/php5-fpm.sock;',
|
||||
' fastcgi_index index.php;',
|
||||
' include fastcgi_params;',
|
||||
' fastcgi_param SCRIPT_FILENAME {publicPath}/index.php;',
|
||||
'}',
|
||||
|
||||
'location ~ ^{webPath} {',
|
||||
' alias {publicPath};',
|
||||
' index index.php;',
|
||||
' try_files $uri $uri/ {webPath}/index.php$is_args$args;',
|
||||
'}',
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue