Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F5331959
nginx.pp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 21, 1:56 AM
Size
1 KB
Mime Type
text/x-c++
Expires
Mon, Nov 23, 1:56 AM (1 d, 17 h)
Engine
blob
Format
Raw Data
Handle
314892
Attached To
rXR Xreate
nginx.pp
View Options
class phabricator::nginx {
class {'nginx':
client_max_body_size => '32M'
}
$access_log = "${phabricator::logs_dir}nginx-access.log"
$error_log = "${phabricator::logs_dir}nginx-error.log"
nginx::resource::server {$phabricator::server_url:
ensure => present,
use_default_location => false,
www_root => "${phabricator::install_dir}phabricator/webroot",
access_log => $access_log,
error_log => $error_log,
rewrite_www_to_non_www => true,
notify => Class['php::fpm::service']
}
nginx::resource::location{'/':
ensure => present,
server => $phabricator::server_url,
index_files => ['index.php'],
rewrite_rules => ['^/(.*)$ /index.php?__path__=/$1 last']
}
nginx::resource::location{'/index.php':
ensure => present,
server => $phabricator::server_url,
fastcgi => "unix:${phabricator::fpm_socket}",
fastcgi_index => 'index.php',
fastcgi_param => {
'REDIRECT_STATUS'=> '200',
'SCRIPT_FILENAME'=> '$document_root$fastcgi_script_name',
'QUERY_STRING'=> '$query_string',
'REQUEST_METHOD'=> '$request_method',
'CONTENT_TYPE'=> '$content_type',
'CONTENT_LENGTH'=> '$content_length',
'SCRIPT_NAME'=> '$fastcgi_script_name',
'GATEWAY_INTERFACE'=> 'CGI/1.1',
'SERVER_SOFTWARE'=> 'nginx/$nginx_version',
'REMOTE_ADDR'=> '$remote_addr'
}
}
logrotate::rule { 'nginx':
ensure => 'present',
path => [$access_log, $error_log],
compress => true,
delaycompress => true,
ifempty => false,
missingok => true,
rotate_every => 'week',
rotate => 40
}
}
Event Timeline
Log In to Comment