mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 00:04:04 +02:00
parent
8e28fff524
commit
f49c8c02db
35
library/Icinga/Config/Webserver/Nginx.php
Normal file
35
library/Icinga/Config/Webserver/Nginx.php
Normal file
@ -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…
x
Reference in New Issue
Block a user