Eric Lippmann 2ad2127ae3 Merge branch 'master' into feature/generate-webserver-config-6120
Conflicts:
	application/clicommands/SetupCommand.php
2014-11-13 12:50:55 +01:00

38 lines
736 B
PHP

<?php
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Module\Setup\Webserver;
use Icinga\Module\Setup\Webserver;
/**
* Generate nginx configuration
*/
class Nginx extends Webserver
{
/**
* Specific template
*
* @return array|string
*/
protected function getTemplate()
{
return <<<'EOD'
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 $1 $uri $uri/ {webPath}/index.php$is_args$args;
}
EOD;
}
}