Merge pull request #1354 from aztech-dev/master

Use correct script for API location
This commit is contained in:
Benoît Burnichon
2015-04-17 10:20:53 +02:00

View File

@@ -789,7 +789,7 @@ define nginx_vhost (
'include' => 'fastcgi_params' 'include' => 'fastcgi_params'
}, $fastcgi_pass_hash) }, $fastcgi_pass_hash)
nginx::resource::location { "${server_name}-php": nginx::resource::location { "${server_name}-index":
ensure => present, ensure => present,
location => '@rewriteapp', location => '@rewriteapp',
vhost => $server_name, vhost => $server_name,
@@ -799,17 +799,17 @@ define nginx_vhost (
} }
} }
nginx::resource::location { "${server_name}-php1": nginx::resource::location { "${server_name}-api":
ensure => present, ensure => present,
location => '/api', location => '/api',
vhost => $server_name, vhost => $server_name,
www_root => $www_root, www_root => $www_root,
location_cfg_append => { location_cfg_append => {
rewrite => '^(.*)$ /index.php/$1 last' rewrite => '^(.*)$ /api.php/$1 last'
} }
} }
nginx::resource::location { "${server_name}-php2": nginx::resource::location { "${server_name}-php":
ensure => present, ensure => present,
location => '~ ^/(index|index_dev|api)\.php(/|$)', location => '~ ^/(index|index_dev|api)\.php(/|$)',
vhost => $server_name, vhost => $server_name,