mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Merge branch '3.8' into fix-latest-merge
Conflicts: README.md composer.json composer.lock config/configuration.sample.yml lib/Alchemy/Phrasea/Application/Api.php lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php lib/Alchemy/Phrasea/Controller/Api/Oauth2.php lib/Alchemy/Phrasea/Controller/Prod/Basket.php lib/Alchemy/Phrasea/Core/Event/Subscriber/ApiExceptionHandlerSubscriber.php lib/Alchemy/Phrasea/Core/Provider/RegistrationServiceProvider.php lib/Alchemy/Phrasea/Core/Version.php lib/classes/API/V1/adapter.php lib/classes/API/V1/result.php lib/classes/module/console/schedulerStart.php lib/classes/module/console/schedulerState.php lib/classes/module/console/schedulerStop.php lib/classes/module/console/taskrun.php lib/classes/set/export.php lib/conf.d/_GV_template.inc lib/conf.d/configuration.yml templates/web/admin/setup.html.twig templates/web/admin/tasks/list.html.twig templates/web/api/auth/end_user_authorization.html.twig templates/web/prod/actions/Feedback/list.html.twig templates/web/prod/actions/publish/publish.html.twig templates/web/prod/upload/upload.html.twig tests/classes/api/v1/api_v1_adapterTest.php tests/classes/api/v1/api_v1_resultTest.php
This commit is contained in:
12
README.md
12
README.md
@@ -14,15 +14,21 @@ Phraseanet 3.9 - Digital Asset Management application
|
||||
|
||||
https://docs.phraseanet.com/
|
||||
|
||||
#Installation
|
||||
#Installation :
|
||||
|
||||
You **must** not download the source from GitHub, but download a packaged version here :
|
||||
|
||||
https://sourceforge.net/projects/phraseanet/files/
|
||||
https://www.phraseanet.com/download/
|
||||
|
||||
And follow the install steps described at https://docs.phraseanet.com/Admin/
|
||||
|
||||
#License
|
||||
#Developement :
|
||||
|
||||
For development purpose Phraseanet is shipped with ready to use development environments using vagrant.
|
||||
|
||||
See https://docs.phraseanet.com/Devel/
|
||||
|
||||
#License :
|
||||
|
||||
Phraseanet is licensed under GPL-v3 license.
|
||||
|
||||
|
242
Vagrantfile
vendored
Normal file
242
Vagrantfile
vendored
Normal file
@@ -0,0 +1,242 @@
|
||||
require 'yaml'
|
||||
|
||||
root = File.dirname(File.expand_path(__FILE__))
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
Dir.glob(root+"/vagrant/vms/**/puphpet/config.yaml").each do|f|
|
||||
dir = File.dirname(File.expand_path(f)+"/..")
|
||||
base_path = dir[0..-21]
|
||||
configValues = YAML.load_file(f)
|
||||
data = configValues['vagrantfile-local']
|
||||
|
||||
config.vm.define "vm-#{data['name']}" do |node|
|
||||
node.vm.box = "#{data['vm']['box']}"
|
||||
node.vm.box_url = "#{data['vm']['box_url']}"
|
||||
|
||||
if data['vm']['hostname'].to_s.strip.length != 0
|
||||
node.vm.hostname = "#{data['vm']['hostname']}"
|
||||
end
|
||||
|
||||
node.vm.provider :virtualbox do |vb|
|
||||
vb.name = "#{data['name']}"
|
||||
end
|
||||
|
||||
if data['vm']['network']['private_network'].to_s != ''
|
||||
node.vm.network "private_network", ip: "#{data['vm']['network']['private_network']}"
|
||||
end
|
||||
|
||||
data['vm']['network']['forwarded_port'].each do |i, port|
|
||||
|
||||
if port['guest'] != '' && port['host'] != ''
|
||||
node.vm.network :forwarded_port, guest: port['guest'].to_i, host: port['host'].to_i
|
||||
end
|
||||
end
|
||||
|
||||
if Vagrant.has_plugin?('vagrant-hostsupdater')
|
||||
hosts = Array.new()
|
||||
|
||||
if !configValues['apache']['install'].nil? &&
|
||||
configValues['apache']['install'].to_i == 1 &&
|
||||
configValues['apache']['vhosts'].is_a?(Hash)
|
||||
configValues['apache']['vhosts'].each do |i, vhost|
|
||||
hosts.push(vhost['servername'])
|
||||
|
||||
if vhost['serveraliases'].is_a?(Array)
|
||||
vhost['serveraliases'].each do |vhost_alias|
|
||||
hosts.push(vhost_alias)
|
||||
end
|
||||
end
|
||||
end
|
||||
elsif !configValues['nginx']['install'].nil? &&
|
||||
configValues['nginx']['install'].to_i == 1 &&
|
||||
configValues['nginx']['vhosts'].is_a?(Hash)
|
||||
configValues['nginx']['vhosts'].each do |i, vhost|
|
||||
hosts.push(vhost['server_name'])
|
||||
|
||||
if vhost['server_aliases'].is_a?(Array)
|
||||
vhost['server_aliases'].each do |x, vhost_alias|
|
||||
hosts.push(vhost_alias)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if hosts.any?
|
||||
contents = File.open("#{dir}/puphpet/shell/hostsupdater-notice.txt", 'r'){ |file| file.read }
|
||||
puts "\n\033[34m#{contents}\033[0m\n"
|
||||
|
||||
if node.vm.hostname.to_s.strip.length == 0
|
||||
node.vm.hostname = 'puphpet-dev-machine'
|
||||
end
|
||||
|
||||
node.hostsupdater.aliases = hosts
|
||||
end
|
||||
end
|
||||
|
||||
data['vm']['synced_folder'].each do |i, folder|
|
||||
if folder['source'] == ''
|
||||
folder['source'] = root
|
||||
end
|
||||
if folder['source'] != '' && folder['target'] != ''
|
||||
if folder['sync_type'] == 'nfs'
|
||||
node.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: "nfs"
|
||||
elsif folder['sync_type'] == 'smb'
|
||||
node.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: "smb"
|
||||
elsif folder['sync_type'] == 'rsync'
|
||||
rsync_args = !folder['rsync']['args'].nil? ? folder['rsync']['args'] : ["--verbose", "--archive", "--delete", "-z"]
|
||||
rsync_auto = !folder['rsync']['auto'].nil? ? folder['rsync']['auto'] : true
|
||||
rsync_exclude = !folder['rsync']['exclude'].nil? ? folder['rsync']['exclude'] : [".vagrant/"]
|
||||
|
||||
node.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}",
|
||||
rsync__args: rsync_args, rsync__exclude: rsync_exclude, rsync__auto: rsync_auto, type: "rsync"
|
||||
else
|
||||
node.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}",
|
||||
group: 'www-data', owner: 'www-data', mount_options: ["dmode=775", "fmode=764"]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
node.vm.usable_port_range = (10200..10500)
|
||||
|
||||
if data['vm']['chosen_provider'].empty? || data['vm']['chosen_provider'] == "virtualbox"
|
||||
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox'
|
||||
|
||||
node.vm.provider :virtualbox do |virtualbox|
|
||||
data['vm']['provider']['virtualbox']['modifyvm'].each do |key, value|
|
||||
if key == "memory"
|
||||
next
|
||||
end
|
||||
|
||||
if key == "natdnshostresolver1"
|
||||
value = value ? "on" : "off"
|
||||
end
|
||||
|
||||
virtualbox.customize ["modifyvm", :id, "--#{key}", "#{value}"]
|
||||
end
|
||||
|
||||
virtualbox.customize ["modifyvm", :id, "--memory", "#{data['vm']['memory']}"]
|
||||
|
||||
if data['vm']['hostname'].to_s.strip.length != 0
|
||||
virtualbox.customize ["modifyvm", :id, "--name", node.vm.hostname]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if data['vm']['chosen_provider'] == "vmware_fusion" || data['vm']['chosen_provider'] == "vmware_workstation"
|
||||
ENV['VAGRANT_DEFAULT_PROVIDER'] = (data['vm']['chosen_provider'] == "vmware_fusion") ? "vmware_fusion" : "vmware_workstation"
|
||||
|
||||
node.vm.provider "vmware_fusion" do |v|
|
||||
data['vm']['provider']['vmware'].each do |key, value|
|
||||
if key == "memsize"
|
||||
next
|
||||
end
|
||||
|
||||
v.vmx["#{key}"] = "#{value}"
|
||||
end
|
||||
|
||||
v.vmx["memsize"] = "#{data['vm']['memory']}"
|
||||
|
||||
if data['vm']['hostname'].to_s.strip.length != 0
|
||||
v.vmx["displayName"] = node.vm.hostname
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if data['vm']['chosen_provider'] == "parallels"
|
||||
ENV['VAGRANT_DEFAULT_PROVIDER'] = "parallels"
|
||||
|
||||
node.vm.provider "parallels" do |v|
|
||||
data['vm']['provider']['parallels'].each do |key, value|
|
||||
if key == "memsize"
|
||||
next
|
||||
end
|
||||
|
||||
v.customize ["set", :id, "--#{key}", "#{value}"]
|
||||
end
|
||||
|
||||
v.memory = "#{data['vm']['memory']}"
|
||||
|
||||
if data['vm']['hostname'].to_s.strip.length != 0
|
||||
v.name = node.vm.hostname
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ssh_username = !data['ssh']['username'].nil? ? data['ssh']['username'] : "vagrant"
|
||||
|
||||
node.vm.provision "shell" do |s|
|
||||
s.path = "#{base_path}/puphpet/shell/initial-setup.sh"
|
||||
s.args = "/vagrant/vagrant/vms/#{data['name']}/puphpet"
|
||||
end
|
||||
|
||||
node.vm.provision "shell" do |kg|
|
||||
kg.path = "#{base_path}/puphpet/shell/ssh-keygen.sh"
|
||||
kg.args = "#{ssh_username}"
|
||||
end
|
||||
|
||||
node.vm.provision :shell, :path => "#{base_path}/puphpet/shell/update-puppet.sh"
|
||||
|
||||
node.vm.provision :puppet do |puppet|
|
||||
puppet.facter = {
|
||||
"ssh_username" => "#{ssh_username}",
|
||||
"provisioner_type" => ENV['VAGRANT_DEFAULT_PROVIDER'],
|
||||
"vm_target_key" => 'vagrantfile-local',
|
||||
}
|
||||
puppet.manifests_path = "#{data['vm']['provision']['puppet']['manifests_path']}"
|
||||
puppet.manifest_file = "#{data['vm']['provision']['puppet']['manifest_file']}"
|
||||
puppet.module_path = "#{data['vm']['provision']['puppet']['module_path']}"
|
||||
|
||||
if !data['vm']['provision']['puppet']['options'].empty?
|
||||
puppet.options = data['vm']['provision']['puppet']['options']
|
||||
end
|
||||
end
|
||||
|
||||
node.vm.provision :shell do |s|
|
||||
s.path = "#{base_path}/puphpet/shell/execute-files.sh"
|
||||
s.args = ["exec-once", "exec-always"]
|
||||
end
|
||||
|
||||
node.vm.provision :shell, run: "always" do |s|
|
||||
s.path = "#{base_path}/puphpet/shell/execute-files.sh"
|
||||
s.args = ["startup-once", "startup-always"]
|
||||
end
|
||||
|
||||
node.vm.provision :shell, :path => "#{base_path}/puphpet/shell/important-notices.sh"
|
||||
|
||||
if File.file?("#{dir}/puphpet/files/dot/ssh/id_rsa")
|
||||
node.ssh.private_key_path = [
|
||||
"#{dir}/puphpet/files/dot/ssh/id_rsa",
|
||||
"#{dir}/puphpet/files/dot/ssh/insecure_private_key"
|
||||
]
|
||||
end
|
||||
|
||||
if !data['ssh']['host'].nil?
|
||||
node.ssh.host = "#{data['ssh']['host']}"
|
||||
end
|
||||
if !data['ssh']['port'].nil?
|
||||
node.ssh.port = "#{data['ssh']['port']}"
|
||||
end
|
||||
if !data['ssh']['username'].nil?
|
||||
node.ssh.username = "#{data['ssh']['username']}"
|
||||
end
|
||||
if !data['ssh']['guest_port'].nil?
|
||||
node.ssh.guest_port = data['ssh']['guest_port']
|
||||
end
|
||||
if !data['ssh']['shell'].nil?
|
||||
node.ssh.shell = "#{data['ssh']['shell']}"
|
||||
end
|
||||
if !data['ssh']['keep_alive'].nil?
|
||||
node.ssh.keep_alive = data['ssh']['keep_alive']
|
||||
end
|
||||
if !data['ssh']['forward_agent'].nil?
|
||||
node.ssh.forward_agent = data['ssh']['forward_agent']
|
||||
end
|
||||
if !data['ssh']['forward_x11'].nil?
|
||||
node.ssh.forward_x11 = data['ssh']['forward_x11']
|
||||
end
|
||||
if !data['vagrant']['host'].nil?
|
||||
node.vagrant.host = data['vagrant']['host'].gsub(":", "").intern
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@@ -80,7 +80,8 @@
|
||||
"twig/extensions" : "~1.0",
|
||||
"vierbergenlars/php-semver" : "~2.1",
|
||||
"zend/gdata" : "~1.12.1",
|
||||
"doctrine/migrations" : "1.0.x-dev@dev"
|
||||
"doctrine/migrations" : "1.0.x-dev@dev",
|
||||
willdurand/negotiation" : "~1.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit" : "~3.7",
|
||||
|
53
composer.lock
generated
53
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "ec7feed650089f0abf08f741e3ee9768",
|
||||
"hash": "81820d7853d2c85cbb34fc57910d6963",
|
||||
"packages": [
|
||||
{
|
||||
"name": "alchemy-fr/tcpdf-clone",
|
||||
@@ -3985,6 +3985,56 @@
|
||||
],
|
||||
"time": "2013-09-20 10:41:27"
|
||||
},
|
||||
{
|
||||
"name": "willdurand/negotiation",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/willdurand/Negotiation.git",
|
||||
"reference": "a98fb6b9808610c1aa326c736893d3d77d9383b6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/willdurand/Negotiation/zipball/a98fb6b9808610c1aa326c736893d3d77d9383b6",
|
||||
"reference": "a98fb6b9808610c1aa326c736893d3d77d9383b6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Negotiation": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "William Durand",
|
||||
"email": "william.durand1@gmail.com",
|
||||
"homepage": "http://www.willdurand.fr"
|
||||
}
|
||||
],
|
||||
"description": "Content Negotiation tools for PHP provided as a standalone library.",
|
||||
"homepage": "http://williamdurand.fr/Negotiation/",
|
||||
"keywords": [
|
||||
"accept",
|
||||
"content",
|
||||
"format",
|
||||
"header",
|
||||
"negotiation"
|
||||
],
|
||||
"time": "2014-05-16 12:34:51"
|
||||
},
|
||||
{
|
||||
"name": "zend/gdata",
|
||||
"version": "1.12.1",
|
||||
@@ -4942,6 +4992,7 @@
|
||||
"behat/behat": 20,
|
||||
"behat/gherkin": 20
|
||||
},
|
||||
"prefer-stable": false,
|
||||
"platform": {
|
||||
"php": ">=5.4"
|
||||
},
|
||||
|
@@ -31,6 +31,7 @@ main:
|
||||
options: []
|
||||
task-manager:
|
||||
status: started
|
||||
enabled: true
|
||||
logger:
|
||||
max-files: 10
|
||||
enabled: true
|
||||
|
@@ -83,6 +83,7 @@ use Alchemy\Phrasea\Core\Provider\CacheServiceProvider;
|
||||
use Alchemy\Phrasea\Core\Provider\CacheConnectionServiceProvider;
|
||||
use Alchemy\Phrasea\Core\Provider\ConfigurationServiceProvider;
|
||||
use Alchemy\Phrasea\Core\Provider\ConfigurationTesterServiceProvider;
|
||||
use Alchemy\Phrasea\Core\Provider\ContentNegotiationServiceProvider;
|
||||
use Alchemy\Phrasea\Core\Provider\CSVServiceProvider;
|
||||
use Alchemy\Phrasea\Core\Provider\ConvertersServiceProvider;
|
||||
use Alchemy\Phrasea\Core\Provider\FileServeServiceProvider;
|
||||
@@ -374,6 +375,7 @@ class Application extends SilexApplication
|
||||
$this->register(new ManipulatorServiceProvider());
|
||||
$this->register(new PluginServiceProvider());
|
||||
$this->register(new PhraseaEventServiceProvider());
|
||||
$this->register(new ContentNegotiationServiceProvider());
|
||||
|
||||
$this['phraseanet.exception_handler'] = $this->share(function ($app) {
|
||||
$handler = PhraseaExceptionHandler::register($app['debug']);
|
||||
@@ -470,6 +472,7 @@ class Application extends SilexApplication
|
||||
$dispatcher->addListener(KernelEvents::RESPONSE, [$app, 'addUTF8Charset'], -128);
|
||||
$dispatcher->addSubscriber($app['phraseanet.logout-subscriber']);
|
||||
$dispatcher->addSubscriber($app['phraseanet.locale-subscriber']);
|
||||
$dispatcher->addSubscriber($app['phraseanet.content-negotiation-subscriber']);
|
||||
$dispatcher->addSubscriber($app['phraseanet.maintenance-subscriber']);
|
||||
$dispatcher->addSubscriber($app['phraseanet.cookie-disabler-subscriber']);
|
||||
$dispatcher->addSubscriber($app['phraseanet.session-manager-subscriber']);
|
||||
|
@@ -27,7 +27,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
return call_user_func(function ($environment = PhraseaApplication::ENV_PROD) {
|
||||
|
||||
$app = new PhraseaApplication($environment);
|
||||
$app->loadPlugins();
|
||||
|
||||
@@ -40,6 +39,52 @@ return call_user_func(function ($environment = PhraseaApplication::ENV_PROD) {
|
||||
return $monolog;
|
||||
}));
|
||||
|
||||
// handle API content negotiation
|
||||
$app->before(function(Request $request) use ($app) {
|
||||
// register custom API format
|
||||
$request->setFormat(\API_V1_result::FORMAT_JSON_EXTENDED, \API_V1_adapter::$extendedContentTypes['json']);
|
||||
$request->setFormat(\API_V1_result::FORMAT_YAML_EXTENDED, \API_V1_adapter::$extendedContentTypes['yaml']);
|
||||
$request->setFormat(\API_V1_result::FORMAT_JSONP_EXTENDED, \API_V1_adapter::$extendedContentTypes['jsonp']);
|
||||
$request->setFormat(\API_V1_result::FORMAT_JSONP, array('text/javascript', 'application/javascript'));
|
||||
|
||||
// handle content negociation
|
||||
$priorities = array('application/json', 'application/yaml', 'text/yaml', 'text/javascript', 'application/javascript');
|
||||
foreach (\API_V1_adapter::$extendedContentTypes['json'] as $priorities[]);
|
||||
foreach (\API_V1_adapter::$extendedContentTypes['yaml'] as $priorities[]);
|
||||
$format = $app['format.negociator']->getBest($request->headers->get('accept') ,$priorities);
|
||||
|
||||
// throw unacceptable http error if API can not handle asked format
|
||||
if (null === $format) {
|
||||
$app->abort(406);
|
||||
}
|
||||
// set request format according to negotiated content or override format with JSONP if callback parameter is defined
|
||||
if (trim($request->get('callback')) !== '') {
|
||||
$request->setRequestFormat(\API_V1_result::FORMAT_JSONP);
|
||||
} else {
|
||||
$request->setRequestFormat($request->getFormat($format->getValue()));
|
||||
}
|
||||
|
||||
// tells whether asked format is extended or not
|
||||
$request->attributes->set('_extended', in_array(
|
||||
$request->getRequestFormat(\API_V1_result::FORMAT_JSON),
|
||||
array(
|
||||
\API_V1_result::FORMAT_JSON_EXTENDED,
|
||||
\API_V1_result::FORMAT_YAML_EXTENDED,
|
||||
\API_V1_result::FORMAT_JSONP_EXTENDED
|
||||
)
|
||||
));
|
||||
}, PhraseaApplication::EARLY_EVENT);
|
||||
|
||||
$app->after(function(Request $request, Response $response) use ($app) {
|
||||
if ($request->getRequestFormat(\API_V1_result::FORMAT_JSON) === \API_V1_result::FORMAT_JSONP && !$response->isOk() && !$response->isServerError()) {
|
||||
$response->setStatusCode(200);
|
||||
}
|
||||
// set response content type
|
||||
if (!$response->headers->get('Content-Type')) {
|
||||
$response->headers->set('Content-Type', $request->getMimeType($request->getRequestFormat(\API_V1_result::FORMAT_JSON)));
|
||||
}
|
||||
});
|
||||
|
||||
$app->get('/api/', function (Request $request, SilexApplication $app) {
|
||||
return Result::create($request, [
|
||||
'name' => $app['conf']->get(['registry', 'general', 'title']),
|
||||
|
@@ -79,7 +79,11 @@ class Manager
|
||||
$cache = $this->factory->create('array', []);
|
||||
}
|
||||
|
||||
if (isset($options['namespace']) && is_string($options['namespace'])) {
|
||||
$cache->setNamespace($options['namespace']);
|
||||
} else {
|
||||
$cache->setNamespace(md5(gethostname().'-'.__DIR__));
|
||||
}
|
||||
|
||||
$this->drivers[$label] = $cache;
|
||||
|
||||
|
@@ -14,6 +14,8 @@ namespace Alchemy\Phrasea\Controller\Admin;
|
||||
use Alchemy\Phrasea\Exception\InvalidArgumentException;
|
||||
use Alchemy\Phrasea\Form\TaskForm;
|
||||
use Alchemy\Phrasea\Model\Entities\Task;
|
||||
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||
use Alchemy\Phrasea\Exception\XMLParseErrorException;
|
||||
use Silex\Application;
|
||||
use Silex\ControllerProviderInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@@ -330,6 +332,10 @@ class TaskManager implements ControllerProviderInterface
|
||||
|
||||
public function validateXML(Application $app, Request $request)
|
||||
{
|
||||
if (false === $app['phraseanet.configuration']['main']['task-manager']['enabled']) {
|
||||
throw new RuntimeException('The use of the task manager is disabled on this instance.');
|
||||
}
|
||||
|
||||
return $app->json(['success' => $this->doValidateXML($request->getContent())]);
|
||||
}
|
||||
|
||||
|
@@ -48,7 +48,7 @@ class Oauth2 implements ControllerProviderInterface
|
||||
$params = $oauth2Adapter->getAuthorizationRequestParameters($request);
|
||||
|
||||
$appAuthorized = false;
|
||||
$errorMessage = false;
|
||||
$errorMessage = $request->get('error', '');
|
||||
|
||||
if (null === $client = $app['repo.api-applications']->findByClientId($params['client_id'])) {
|
||||
throw new NotFoundHttpException(sprintf('Application with client id %s could not be found', $params['client_id']));
|
||||
@@ -80,18 +80,21 @@ class Oauth2 implements ControllerProviderInterface
|
||||
if (null === $usrId = $app['auth.native']->getUsrId($request->get("login"), $request->get("password"), $request)) {
|
||||
$app['session']->getFlashBag()->set('error', $app->trans('login::erreur: Erreur d\'authentification'));
|
||||
|
||||
return $app->redirectPath('oauth2_authorize');
|
||||
return $app->redirectPath('oauth2_authorize', array_merge(array('error' => 'login'), $params));
|
||||
}
|
||||
} catch (RequireCaptchaException $e) {
|
||||
return $app->redirectPath('oauth2_authorize', ['error' => 'captcha']);
|
||||
return $app->redirectPath('oauth2_authorize', array_merge(array('error' => 'captcha'), $params));
|
||||
} catch (AccountLockedException $e) {
|
||||
return $app->redirectPath('oauth2_authorize', ['error' => 'account-locked']);
|
||||
return $app->redirectPath('oauth2_authorize', array_merge(array('error' => 'account-locked'), $params));
|
||||
}
|
||||
|
||||
$app['authentication']->openAccount($app['repo.users']->find($usrId));
|
||||
}
|
||||
} else {
|
||||
$r = new Response($app['twig']->render($template, array('error' => $error, "auth" => $oauth2_adapter)));
|
||||
$r->headers->set('Content-Type', 'text/html');
|
||||
|
||||
return new Response($app['twig']->render($template, ["auth" => $oauth2Adapter]));
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
|
||||
//check if current client is already authorized by current user
|
||||
@@ -114,10 +117,12 @@ class Oauth2 implements ControllerProviderInterface
|
||||
"errorMessage" => $errorMessage,
|
||||
];
|
||||
|
||||
return new Response($app['twig']->render($template, $params));
|
||||
$r = new Response($app['twig']->render($template, $params));
|
||||
$r->headers->set('Content-Type', 'text/html');
|
||||
|
||||
return $r;
|
||||
} elseif (!$appAuthorized && $actionAccept !== null) {
|
||||
$appAuthorized = (Boolean) $actionAccept;
|
||||
|
||||
if ($appAuthorized) {
|
||||
$app['manipulator.api-account']->authorizeAccess($account);
|
||||
} else {
|
||||
@@ -129,7 +134,10 @@ class Oauth2 implements ControllerProviderInterface
|
||||
if ($oauth2Adapter->isNativeApp($params['redirect_uri'])) {
|
||||
$params = $oauth2Adapter->finishNativeClientAuthorization($appAuthorized, $params);
|
||||
|
||||
return new Response($app['twig']->render("api/auth/native_app_access_token.html.twig", $params));
|
||||
$r = new Response($app['twig']->render("api/auth/native_app_access_token.html.twig", $params));
|
||||
$r->headers->set('Content-Type', 'text/html');
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
$oauth2Adapter->finishClientAuthorization($appAuthorized, $params);
|
||||
|
@@ -183,7 +183,7 @@ class Permalink extends AbstractDelivery
|
||||
$stamp = true;
|
||||
break;
|
||||
case 'wm':
|
||||
$watermark = false;
|
||||
$watermark = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -243,7 +243,7 @@ class Export implements ControllerProviderInterface
|
||||
$mail->setButtonUrl($url);
|
||||
$mail->setExpiration($token->getExpiration());
|
||||
|
||||
$app['notification.deliverer']->deliver($mail);
|
||||
$app['notification.deliverer']->deliver($mail, !!$request->request->get('reading_confirm', false));
|
||||
unset($remaingEmails[$key]);
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,9 @@ class ApiExceptionHandlerSubscriber implements EventSubscriberInterface
|
||||
$code = 404;
|
||||
} elseif ($e instanceof HttpExceptionInterface) {
|
||||
if (503 === $e->getStatusCode()) {
|
||||
$code = 503;
|
||||
$code = \API_V1_result::ERROR_MAINTENANCE;
|
||||
} else if (406 === $e->getStatusCode()) {
|
||||
$code = \API_V1_result::ERROR_UNACCEPTABLE;
|
||||
} else {
|
||||
$code = 500;
|
||||
}
|
||||
|
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2014 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Alchemy\Phrasea\Core\Event\Subscriber;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Symfony\Component\HttpKernel\KernelEvents;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
|
||||
|
||||
class ContentNegotiationSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
private $app;
|
||||
|
||||
public function __construct(Application $app)
|
||||
{
|
||||
$this->app = $app;
|
||||
}
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
KernelEvents::REQUEST => array('onKernelRequest', Application::EARLY_EVENT),
|
||||
);
|
||||
}
|
||||
|
||||
public function onKernelRequest(GetResponseEvent $event)
|
||||
{
|
||||
$priorities = array('text/html', 'application/json', '*/*');
|
||||
$format = $this->app['format.negociator']->getBest($event->getRequest()->headers->get('accept', '*/*'), $priorities);
|
||||
|
||||
if (null === $format) {
|
||||
$this->app->abort(406, 'Not acceptable');
|
||||
}
|
||||
|
||||
$event->getRequest()->setRequestFormat($event->getRequest()->getFormat($format->getValue()));
|
||||
}
|
||||
}
|
@@ -59,18 +59,6 @@ class PhraseaLocaleSubscriber implements EventSubscriberInterface
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* add content negotiation here
|
||||
*/
|
||||
$contentTypes = $event->getRequest()->getAcceptableContentTypes();
|
||||
$event->getRequest()->setRequestFormat(
|
||||
$event->getRequest()->getFormat(
|
||||
array_shift(
|
||||
$contentTypes
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$this->app['locale'] = $this->app->share(function (Application $app) use ($event) {
|
||||
if (isset($app['conf'])) {
|
||||
$locale = $app['conf']->get(['languages', 'default'], 'en');
|
||||
|
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2014 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Alchemy\Phrasea\Core\Provider;
|
||||
|
||||
use Negotiation\FormatNegotiator;
|
||||
use Negotiation\LanguageNegotiator;
|
||||
use Negotiation\Negotiator;
|
||||
use Silex\Application;
|
||||
use Silex\ServiceProviderInterface;
|
||||
|
||||
class ContentNegotiationServiceProvider implements ServiceProviderInterface
|
||||
{
|
||||
public function register(Application $app)
|
||||
{
|
||||
$app['negociator'] = $app->share(function ($app) {
|
||||
return new Negotiator();
|
||||
});
|
||||
|
||||
$app['format.negociator'] = $app->share(function ($app) {
|
||||
return new FormatNegotiator();
|
||||
});
|
||||
|
||||
$app['langage.negociator'] = $app->share(function ($app) {
|
||||
return new LanguageNegotiator();
|
||||
});
|
||||
}
|
||||
|
||||
public function boot(Application $app)
|
||||
{
|
||||
}
|
||||
}
|
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Alchemy\Phrasea\Core\Provider;
|
||||
|
||||
use Alchemy\Phrasea\Core\Event\Subscriber\ContentNegotiationSubscriber;
|
||||
use Alchemy\Phrasea\Core\Event\Subscriber\CookiesDisablerSubscriber;
|
||||
use Alchemy\Phrasea\Core\Event\Subscriber\LogoutSubscriber;
|
||||
use Alchemy\Phrasea\Core\Event\Subscriber\MaintenanceSubscriber;
|
||||
@@ -38,6 +39,9 @@ class PhraseaEventServiceProvider implements ServiceProviderInterface
|
||||
$app['phraseanet.session-manager-subscriber'] = $app->share(function (Application $app) {
|
||||
return new SessionManagerSubscriber($app);
|
||||
});
|
||||
$app['phraseanet.content-negotiation-subscriber'] = $app->share(function (Application $app) {
|
||||
return new ContentNegotiationSubscriber($app);
|
||||
});
|
||||
}
|
||||
|
||||
public function boot(Application $app)
|
||||
|
@@ -67,7 +67,7 @@ class RegistrationServiceProvider implements ServiceProviderInterface
|
||||
],
|
||||
'address' => [
|
||||
'label' => 'admin::compte-utilisateur adresse',
|
||||
'type' => 'textarea',
|
||||
'type' => 'text',
|
||||
'constraints' => [
|
||||
new Assert\NotBlank(),
|
||||
]
|
||||
@@ -86,7 +86,7 @@ class RegistrationServiceProvider implements ServiceProviderInterface
|
||||
new Assert\NotBlank(),
|
||||
]
|
||||
],
|
||||
'position' => [
|
||||
'job' => [
|
||||
'label' => 'admin::compte-utilisateur poste',
|
||||
'type' => 'text',
|
||||
'constraints' => [
|
||||
@@ -100,7 +100,7 @@ class RegistrationServiceProvider implements ServiceProviderInterface
|
||||
new Assert\NotBlank(),
|
||||
]
|
||||
],
|
||||
'job' => [
|
||||
'position' => [
|
||||
'label' => 'admin::compte-utilisateur activite',
|
||||
'type' => 'text',
|
||||
'constraints' => [
|
||||
|
@@ -104,11 +104,11 @@ class databox_status
|
||||
$this->status[$bit]["img_on"] = null;
|
||||
|
||||
if (is_file($path . "-stat_" . $bit . "_0.gif")) {
|
||||
$this->status[$bit]["img_off"] = $url . "-stat_" . $bit . "_0.gif";
|
||||
$this->status[$bit]["img_off"] = $url . "-stat_" . $bit . "_0.gif?etag=".md5_file($path . "-stat_" . $bit . "_0.gif");
|
||||
$this->status[$bit]["path_off"] = $path . "-stat_" . $bit . "_0.gif";
|
||||
}
|
||||
if (is_file($path . "-stat_" . $bit . "_1.gif")) {
|
||||
$this->status[$bit]["img_on"] = $url . "-stat_" . $bit . "_1.gif";
|
||||
$this->status[$bit]["img_on"] = $url . "-stat_" . $bit . "_1.gif?etag=".md5_file($path . "-stat_" . $bit . "_1.gif");
|
||||
$this->status[$bit]["path_on"] = $path . "-stat_" . $bit . "_1.gif";
|
||||
}
|
||||
|
||||
|
59
lib/classes/patch/386alpha1a.php
Normal file
59
lib/classes/patch/386alpha1a.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2014 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
class patch_386alpha1a implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.6-alpha.1';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_release()
|
||||
{
|
||||
return $this->release;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function require_all_upgrades()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function concern()
|
||||
{
|
||||
return $this->concern;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function apply(base $databox, Application $app)
|
||||
{
|
||||
$config = $app['phraseanet.configuration']->getConfig();
|
||||
|
||||
$config['main']['task-manager']['enabled'] = true;
|
||||
|
||||
$app['phraseanet.configuration']->setConfig($config);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -777,8 +777,8 @@ class set_export extends set_abstract
|
||||
$log["poids"] = $obj["size"];
|
||||
$log["shortXml"] = $app['serializer.caption']->serialize($record_object->get_caption(), CaptionSerializer::SERIALIZE_XML);
|
||||
$tmplog[$record_object->get_base_id()][] = $log;
|
||||
if (!$anonymous && $o == 'document') {
|
||||
$app['acl']->get($app['authentication']->getUser())->remove_remaining($record_object->get_base_id());
|
||||
if (!$anonymous && $o == 'document' && null !== $app['authentication']->getUser()) {
|
||||
$ $app['acl']->get($app['authentication']->getUser())->remove_remaining($record_object->get_base_id());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -788,7 +788,7 @@ class set_export extends set_abstract
|
||||
|
||||
$list_base = array_unique(array_keys($tmplog));
|
||||
|
||||
if (!$anonymous) {
|
||||
if (!$anonymous && null !== $app['authentication']->getUser()) {
|
||||
$sql = "UPDATE basusr
|
||||
SET remain_dwnld = :remain_dl
|
||||
WHERE base_id = :base_id AND usr_id = :usr_id";
|
||||
|
@@ -30,6 +30,7 @@ main:
|
||||
options: []
|
||||
task-manager:
|
||||
status: started
|
||||
enabled: true
|
||||
logger:
|
||||
max-files: 10
|
||||
enabled: true
|
||||
|
@@ -30,6 +30,15 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form id="GV_form" class="form-horizontal" method="post" action = "{{ path('setup_submit_globals') }}">
|
||||
{% for section in GV %}
|
||||
<fieldset>
|
||||
<legend> {{ section['section'] }} </legend>
|
||||
{% for value in section['vars'] %}
|
||||
{% set readonly = false %}
|
||||
{% if value['readonly'] is defined and value['readonly'] == true %}
|
||||
{% set readonly = true %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{{ form_start(form, {'method': 'POST', 'action' : path('setup_display_globals'), 'attr': {'class' : 'form-horizontal'}}) }}
|
||||
|
@@ -39,8 +39,9 @@
|
||||
{% for key,value in auth.getParams %}
|
||||
<input type="hidden" name="{{key}}" value="{{value}}">
|
||||
{% endfor %}
|
||||
{% if errorMessage is defined %}
|
||||
<p class="login_error">{{ 'Erreur de login / mot de passe' | trans }}</p>
|
||||
{% if error == 'login' %}
|
||||
<br />
|
||||
<p class="alert alert-error" style="color: #E0215D;padding:10px">{{ 'Erreur de login / mot de passe' | trans }}</p>
|
||||
{% endif %}
|
||||
<p class="login_hello">
|
||||
{% trans with {'%home_title%' : home_title} %}Bonjour, veuillez vous identifier sur %home_title% :{% endtrans %}
|
||||
|
@@ -142,7 +142,7 @@
|
||||
{% else %}
|
||||
<td class="w160px">
|
||||
{% endif %}
|
||||
<div class="diapo w160px" style="margin-bottom:0;border-bottom:none;overflow:hidden;">
|
||||
<div class="diapo w160px" style="margin-bottom:0;border-bottom:none;">
|
||||
<div class="title" style="max-height:100%" title="{{ record.get_title() }}">{{ record.get_title() }}</div>
|
||||
<div class="status">{{ record.get_status_icons()|raw }}</div>
|
||||
<table cellpadding="0" cellspacing="0" style="margin: 0pt auto;">
|
||||
|
@@ -25,7 +25,7 @@
|
||||
</td>
|
||||
{% if list.getOwner(app['authentication'].getUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_ADMIN') %}
|
||||
<td style="text-align:right;white-space:nowrap;width:150px;">
|
||||
<button class="deleter btn btn-inverse">
|
||||
<button class="deleter btn btn-inverse" data-list-id="{{ list.getId() }}">
|
||||
{{ 'Delete' | trans }}
|
||||
<input type="hidden" name="list_id" value="{{ list.getId() }}"/>
|
||||
</button>
|
||||
|
@@ -31,7 +31,7 @@
|
||||
{% set class_status = '' %}
|
||||
{% endif %}
|
||||
|
||||
<div pos="{{ i }}" id="idEditDiapo_{{ i }}" class="diapo {{ class_status }}" style="width:{{ cont_width }}px; height:{{ cont_height }}px;">
|
||||
<div pos="{{ i }}" id="idEditDiapo_{{ i }}" class="diapo selected {{ class_status }}" style="width:{{ cont_width }}px; height:{{ cont_height }}px;">
|
||||
<div class='titre'>
|
||||
{{ record.get_original_name() }}
|
||||
</div>
|
||||
|
@@ -43,11 +43,13 @@
|
||||
{% set desc = publishing.basket().getDescription() %}
|
||||
{% endif %}
|
||||
<br />
|
||||
{% if app["phraseanet.registry"].get("GV_enable_feed_notification") %}
|
||||
<label class="checkbox">
|
||||
<input class="required_text checkbox" type="checkbox" name="notify" id="feed_add_notify" value="1" style="min-height: 0; height: auto" />
|
||||
<i class="icon icon-envelope"></i> {{ 'Notify users about this publication' | trans }}
|
||||
</label>
|
||||
<br />
|
||||
{% endif %}
|
||||
<label for="feed_add_title"><b>{{ 'publication : titre' | trans }}</b></label>
|
||||
<input class="required_text input-block-level" style="max-width:500px" type="text" name="title" id="feed_add_title" value="{{title}}" />
|
||||
<label for="feed_add_subtitle"><b>{{ 'publication : sous titre' | trans }}</b></label>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<li onclick="openPreview('REG',0,'{{par.get_serialize_key()}}'); return(false);"
|
||||
class="otherRegToolTip" {% if app['conf'].get(['registry', 'classic', 'stories-preview']) %}tooltipsrc="{{ path('prod_tooltip_caption', { 'sbas_id' : par.get_sbas_id(), 'record_id' : par.get_record_id(), 'context' : 'basket' }) }}" {% endif %}>
|
||||
<img src="{{par.get_thumbnail().get_url()}}" style="width:25px;height:25px;"/>
|
||||
<span class="title"> {{ par.get_title() }} </span>
|
||||
<span class="title" title="{{ par.get_title() }}"> {{ par.get_title() }} </span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
|
||||
{% block content %}
|
||||
{% if results.getError() %}
|
||||
<div>{{results.getError()}}</div>
|
||||
{% else %}
|
||||
@@ -82,3 +82,4 @@
|
||||
</center>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
onDblClick="openPreview('RESULT',{{record.get_number}});">
|
||||
{% endif %}
|
||||
<div style="padding: 4px;">
|
||||
<div style="height:40px; position: relative; z-index: 95;margin-bottom:0;border-bottom:none;overflow:hidden;">
|
||||
<div style="height:40px; position: relative; z-index: 95;margin-bottom:0;border-bottom:none;">
|
||||
<div class="title" style="max-height:100%" title="{{ record.get_title() }}">
|
||||
{{ record.get_title() }}
|
||||
</div>
|
||||
|
@@ -392,22 +392,25 @@ $(document).ready(function () {
|
||||
//on submit file
|
||||
$('#fileupload', UploaderManager.getContainer()).bind('fileuploadsubmit', function (e, data) {
|
||||
var $this = $(this);
|
||||
var params = [];
|
||||
data.formData = [];
|
||||
|
||||
//get form datas attached to the file
|
||||
var dataCollection = [];
|
||||
var pushData = function(k, d) {
|
||||
dataCollection.push(d);
|
||||
};
|
||||
$.each(data.context.find('input, select').serializeArray(), pushData)
|
||||
$.each($("input", $('.collection-status:visible', UploaderManager.getSettingsBox())).serializeArray(), pushData);
|
||||
$.each($("select", UploaderManager.getSettingsBox()).serializeArray(), pushData);
|
||||
params.push(data.context.find('input, select').serializeArray());
|
||||
params.push($("input", $('.collection-status:visible', UploaderManager.getSettingsBox())).serializeArray());
|
||||
params.push($("select", UploaderManager.getSettingsBox()).serializeArray());
|
||||
|
||||
$.each(params, function(i, p) {
|
||||
$.each(p, function (i, f){
|
||||
data.formData.push(f);
|
||||
});
|
||||
});
|
||||
|
||||
dataCollection.push({
|
||||
"name": "b64_image",
|
||||
"value": data["b64_image"]
|
||||
});
|
||||
|
||||
data.formData = dataCollection;
|
||||
//remove current context
|
||||
data.context.remove();
|
||||
|
||||
|
@@ -28,7 +28,6 @@ class ApiExceptionHandlerSubscriberTest extends \PhraseanetTestCase
|
||||
$client->request('GET', '/');
|
||||
|
||||
$this->assertEquals($code, $client->getResponse()->getStatusCode());
|
||||
$this->assertEquals('application/json', $client->getResponse()->headers->get('content-type'));
|
||||
}
|
||||
|
||||
public function provideExceptionsAndCode()
|
||||
|
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Tests\Phrasea\Core\Event\Subscriber;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Alchemy\Phrasea\Core\Event\Subscriber\ContentNegotiationSubscriber;
|
||||
use Symfony\Component\HttpKernel\Client;
|
||||
|
||||
class ContentNegotiationSubscriberTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider negotiationProvider
|
||||
*/
|
||||
public function testContentNegotiationProvider($negotiationHeader, $expectedContentType)
|
||||
{
|
||||
$response = $this->request($negotiationHeader, $expectedContentType);
|
||||
$this->assertArrayHasKey('content-type', $response->headers->all());
|
||||
$this->assertEquals($expectedContentType, $response->headers->get('content-type'));
|
||||
}
|
||||
|
||||
public function negotiationProvider()
|
||||
{
|
||||
return array(
|
||||
array('text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'text/html; charset=UTF-8'),
|
||||
array('application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5', 'text/html; charset=UTF-8'),
|
||||
array('image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/msword, */*', 'text/html; charset=UTF-8'),
|
||||
array('application/json, */*', 'application/json')
|
||||
);
|
||||
}
|
||||
|
||||
private function request($accept)
|
||||
{
|
||||
$app = new Application('test');
|
||||
$app['dispatcher']->addSubscriber(new ContentNegotiationSubscriber($app));
|
||||
$app->get('/content/negociation', function () {
|
||||
return '';
|
||||
});
|
||||
$client = new Client($app);
|
||||
$client->request('GET', '/content/negociation',
|
||||
array(),
|
||||
array(),
|
||||
array(
|
||||
'HTTP_Accept' => $accept
|
||||
)
|
||||
);
|
||||
|
||||
return $client->getResponse();
|
||||
}
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Tests\Phrasea\Core\Provider;
|
||||
|
||||
use Alchemy\Phrasea\Application as PhraseaApplication;
|
||||
use Silex\Application;
|
||||
|
||||
class classContentNegotiationServiceProviderTest extends ServiceProviderTestCase
|
||||
{
|
||||
public function provideServiceDescription()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
'Alchemy\Phrasea\Core\Provider\ContentNegotiationServiceProvider',
|
||||
'negociator',
|
||||
'Negotiation\Negotiator',
|
||||
),
|
||||
array(
|
||||
'Alchemy\Phrasea\Core\Provider\ContentNegotiationServiceProvider',
|
||||
'format.negociator',
|
||||
'Negotiation\FormatNegotiator'
|
||||
),
|
||||
array(
|
||||
'Alchemy\Phrasea\Core\Provider\ContentNegotiationServiceProvider',
|
||||
'langage.negociator',
|
||||
'Negotiation\LanguageNegotiator'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
384
vagrant/config/nginx/php5-fpm-www.conf
Normal file
384
vagrant/config/nginx/php5-fpm-www.conf
Normal file
@@ -0,0 +1,384 @@
|
||||
; Start a new pool named 'www'.
|
||||
; the variable $pool can we used in any directive and will be replaced by the
|
||||
; pool name ('www' here)
|
||||
[www]
|
||||
|
||||
; Per pool prefix
|
||||
; It only applies on the following directives:
|
||||
; - 'slowlog'
|
||||
; - 'listen' (unixsocket)
|
||||
; - 'chroot'
|
||||
; - 'chdir'
|
||||
; - 'php_values'
|
||||
; - 'php_admin_values'
|
||||
; When not set, the global prefix (or /usr) applies instead.
|
||||
; Note: This directive can also be relative to the global prefix.
|
||||
; Default Value: none
|
||||
;prefix = /path/to/pools/$pool
|
||||
|
||||
; Unix user/group of processes
|
||||
; Note: The user is mandatory. If the group is not set, the default user's group
|
||||
; will be used.
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
; The address on which to accept FastCGI requests.
|
||||
; Valid syntaxes are:
|
||||
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
|
||||
; a specific port;
|
||||
; 'port' - to listen on a TCP socket to all addresses on a
|
||||
; specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
listen = /var/run/php5-fpm.sock
|
||||
|
||||
; Set listen(2) backlog. A value of '-1' means unlimited.
|
||||
; Default Value: 128 (-1 on FreeBSD and OpenBSD)
|
||||
;listen.backlog = -1
|
||||
|
||||
; Set permissions for unix socket, if one is used. In Linux, read/write
|
||||
; permissions must be set in order to allow connections from a web server. Many
|
||||
; BSD-derived systems allow connections regardless of permissions.
|
||||
; Default Values: user and group are set as the running user
|
||||
; mode is set to 0666
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
listen.mode = 0666
|
||||
|
||||
; List of ipv4 addresses of FastCGI clients which are allowed to connect.
|
||||
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
|
||||
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
|
||||
; must be separated by a comma. If this value is left blank, connections will be
|
||||
; accepted from any ip address.
|
||||
; Default Value: any
|
||||
;listen.allowed_clients = 127.0.0.1
|
||||
|
||||
; Choose how the process manager will control the number of child processes.
|
||||
; Possible Values:
|
||||
; static - a fixed number (pm.max_children) of child processes;
|
||||
; dynamic - the number of child processes are set dynamically based on the
|
||||
; following directives. With this process management, there will be
|
||||
; always at least 1 children.
|
||||
; pm.max_children - the maximum number of children that can
|
||||
; be alive at the same time.
|
||||
; pm.start_servers - the number of children created on startup.
|
||||
; pm.min_spare_servers - the minimum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is less than this
|
||||
; number then some children will be created.
|
||||
; pm.max_spare_servers - the maximum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is greater than this
|
||||
; number then some children will be killed.
|
||||
; ondemand - no children are created at startup. Children will be forked when
|
||||
; new requests will connect. The following parameter are used:
|
||||
; pm.max_children - the maximum number of children that
|
||||
; can be alive at the same time.
|
||||
; pm.process_idle_timeout - The number of seconds after which
|
||||
; an idle process will be killed.
|
||||
; Note: This value is mandatory.
|
||||
pm = dynamic
|
||||
|
||||
; The number of child processes to be created when pm is set to 'static' and the
|
||||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
|
||||
; This value sets the limit on the number of simultaneous requests that will be
|
||||
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
|
||||
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
|
||||
; CGI. The below defaults are based on a server without much resources. Don't
|
||||
; forget to tweak pm.* to fit your needs.
|
||||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
||||
; Note: This value is mandatory.
|
||||
pm.max_children = 10
|
||||
|
||||
; The number of child processes created on startup.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
|
||||
pm.start_servers = 4
|
||||
|
||||
; The desired minimum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.min_spare_servers = 2
|
||||
|
||||
; The desired maximum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.max_spare_servers = 6
|
||||
|
||||
; The number of seconds after which an idle process will be killed.
|
||||
; Note: Used only when pm is set to 'ondemand'
|
||||
; Default Value: 10s
|
||||
;pm.process_idle_timeout = 10s;
|
||||
|
||||
; The number of requests each child process should execute before respawning.
|
||||
; This can be useful to work around memory leaks in 3rd party libraries. For
|
||||
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||
; Default Value: 0
|
||||
;pm.max_requests = 500
|
||||
|
||||
; The URI to view the FPM status page. If this value is not set, no URI will be
|
||||
; recognized as a status page. It shows the following informations:
|
||||
; pool - the name of the pool;
|
||||
; process manager - static, dynamic or ondemand;
|
||||
; start time - the date and time FPM has started;
|
||||
; start since - number of seconds since FPM has started;
|
||||
; accepted conn - the number of request accepted by the pool;
|
||||
; listen queue - the number of request in the queue of pending
|
||||
; connections (see backlog in listen(2));
|
||||
; max listen queue - the maximum number of requests in the queue
|
||||
; of pending connections since FPM has started;
|
||||
; listen queue len - the size of the socket queue of pending connections;
|
||||
; idle processes - the number of idle processes;
|
||||
; active processes - the number of active processes;
|
||||
; total processes - the number of idle + active processes;
|
||||
; max active processes - the maximum number of active processes since FPM
|
||||
; has started;
|
||||
; max children reached - number of times, the process limit has been reached,
|
||||
; when pm tries to start more children (works only for
|
||||
; pm 'dynamic' and 'ondemand');
|
||||
; Value are updated in real time.
|
||||
; Example output:
|
||||
; pool: www
|
||||
; process manager: static
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 62636
|
||||
; accepted conn: 190460
|
||||
; listen queue: 0
|
||||
; max listen queue: 1
|
||||
; listen queue len: 42
|
||||
; idle processes: 4
|
||||
; active processes: 11
|
||||
; total processes: 15
|
||||
; max active processes: 12
|
||||
; max children reached: 0
|
||||
;
|
||||
; By default the status page output is formatted as text/plain. Passing either
|
||||
; 'html', 'xml' or 'json' in the query string will return the corresponding
|
||||
; output syntax. Example:
|
||||
; http://www.foo.bar/status
|
||||
; http://www.foo.bar/status?json
|
||||
; http://www.foo.bar/status?html
|
||||
; http://www.foo.bar/status?xml
|
||||
;
|
||||
; By default the status page only outputs short status. Passing 'full' in the
|
||||
; query string will also return status for each pool process.
|
||||
; Example:
|
||||
; http://www.foo.bar/status?full
|
||||
; http://www.foo.bar/status?json&full
|
||||
; http://www.foo.bar/status?html&full
|
||||
; http://www.foo.bar/status?xml&full
|
||||
; The Full status returns for each process:
|
||||
; pid - the PID of the process;
|
||||
; state - the state of the process (Idle, Running, ...);
|
||||
; start time - the date and time the process has started;
|
||||
; start since - the number of seconds since the process has started;
|
||||
; requests - the number of requests the process has served;
|
||||
; request duration - the duration in µs of the requests;
|
||||
; request method - the request method (GET, POST, ...);
|
||||
; request URI - the request URI with the query string;
|
||||
; content length - the content length of the request (only with POST);
|
||||
; user - the user (PHP_AUTH_USER) (or '-' if not set);
|
||||
; script - the main script called (or '-' if not set);
|
||||
; last request cpu - the %cpu the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because CPU calculation is done when the request
|
||||
; processing has terminated;
|
||||
; last request memory - the max amount of memory the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because memory calculation is done when the request
|
||||
; processing has terminated;
|
||||
; If the process is in Idle state, then informations are related to the
|
||||
; last request the process has served. Otherwise informations are related to
|
||||
; the current request being served.
|
||||
; Example output:
|
||||
; ************************
|
||||
; pid: 31330
|
||||
; state: Running
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 63087
|
||||
; requests: 12808
|
||||
; request duration: 1250261
|
||||
; request method: GET
|
||||
; request URI: /test_mem.php?N=10000
|
||||
; content length: 0
|
||||
; user: -
|
||||
; script: /home/fat/web/docs/php/test_mem.php
|
||||
; last request cpu: 0.00
|
||||
; last request memory: 0
|
||||
;
|
||||
; Note: There is a real-time FPM status monitoring sample web page available
|
||||
; It's available in: ${prefix}/share/fpm/status.html
|
||||
;
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
;pm.status_path = /status
|
||||
|
||||
; The ping URI to call the monitoring page of FPM. If this value is not set, no
|
||||
; URI will be recognized as a ping page. This could be used to test from outside
|
||||
; that FPM is alive and responding, or to
|
||||
; - create a graph of FPM availability (rrd or such);
|
||||
; - remove a server from a group if it is not responding (load balancing);
|
||||
; - trigger alerts for the operating team (24/7).
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
;ping.path = /ping
|
||||
|
||||
; This directive may be used to customize the response of a ping request. The
|
||||
; response is formatted as text/plain with a 200 response code.
|
||||
; Default Value: pong
|
||||
;ping.response = pong
|
||||
|
||||
; The access log file
|
||||
; Default: not set
|
||||
;access.log = log/$pool.access.log
|
||||
|
||||
; The access log format.
|
||||
; The following syntax is allowed
|
||||
; %%: the '%' character
|
||||
; %C: %CPU used by the request
|
||||
; it can accept the following format:
|
||||
; - %{user}C for user CPU only
|
||||
; - %{system}C for system CPU only
|
||||
; - %{total}C for user + system CPU (default)
|
||||
; %d: time taken to serve the request
|
||||
; it can accept the following format:
|
||||
; - %{seconds}d (default)
|
||||
; - %{miliseconds}d
|
||||
; - %{mili}d
|
||||
; - %{microseconds}d
|
||||
; - %{micro}d
|
||||
; %e: an environment variable (same as $_ENV or $_SERVER)
|
||||
; it must be associated with embraces to specify the name of the env
|
||||
; variable. Some exemples:
|
||||
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
|
||||
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
|
||||
; %f: script filename
|
||||
; %l: content-length of the request (for POST request only)
|
||||
; %m: request method
|
||||
; %M: peak of memory allocated by PHP
|
||||
; it can accept the following format:
|
||||
; - %{bytes}M (default)
|
||||
; - %{kilobytes}M
|
||||
; - %{kilo}M
|
||||
; - %{megabytes}M
|
||||
; - %{mega}M
|
||||
; %n: pool name
|
||||
; %o: ouput header
|
||||
; it must be associated with embraces to specify the name of the header:
|
||||
; - %{Content-Type}o
|
||||
; - %{X-Powered-By}o
|
||||
; - %{Transfert-Encoding}o
|
||||
; - ....
|
||||
; %p: PID of the child that serviced the request
|
||||
; %P: PID of the parent of the child that serviced the request
|
||||
; %q: the query string
|
||||
; %Q: the '?' character if query string exists
|
||||
; %r: the request URI (without the query string, see %q and %Q)
|
||||
; %R: remote IP address
|
||||
; %s: status (response code)
|
||||
; %t: server time the request was received
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %T: time the log has been written (the request has finished)
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %u: remote user
|
||||
;
|
||||
; Default: "%R - %u %t \"%m %r\" %s"
|
||||
;access.format = %R - %u %t "%m %r%Q%q" %s %f %{mili}d %{kilo}M %C%%
|
||||
|
||||
; The log file for slow requests
|
||||
; Default Value: not set
|
||||
; Note: slowlog is mandatory if request_slowlog_timeout is set
|
||||
;slowlog = log/$pool.log.slow
|
||||
|
||||
; The timeout for serving a single request after which a PHP backtrace will be
|
||||
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_slowlog_timeout = 0
|
||||
|
||||
; The timeout for serving a single request after which the worker process will
|
||||
; be killed. This option should be used when the 'max_execution_time' ini option
|
||||
; does not stop script execution for some reason. A value of '0' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_terminate_timeout = 0
|
||||
|
||||
; Set open file descriptor rlimit.
|
||||
; Default Value: system defined value
|
||||
;rlimit_files = 1024
|
||||
|
||||
; Set max core size rlimit.
|
||||
; Possible Values: 'unlimited' or an integer greater or equal to 0
|
||||
; Default Value: system defined value
|
||||
;rlimit_core = 0
|
||||
|
||||
; Chroot to this directory at the start. This value must be defined as an
|
||||
; absolute path. When this value is not set, chroot is not used.
|
||||
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
|
||||
; of its subdirectories. If the pool prefix is not set, the global prefix
|
||||
; will be used instead.
|
||||
; Note: chrooting is a great security feature and should be used whenever
|
||||
; possible. However, all PHP paths will be relative to the chroot
|
||||
; (error_log, sessions.save_path, ...).
|
||||
; Default Value: not set
|
||||
;chroot =
|
||||
|
||||
; Chdir to this directory at the start.
|
||||
; Note: relative path can be used.
|
||||
; Default Value: current directory or / when chroot
|
||||
chdir = /
|
||||
|
||||
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||
; Note: on highloaded environement, this can cause some delay in the page
|
||||
; process time (several ms).
|
||||
; Default Value: no
|
||||
;catch_workers_output = yes
|
||||
|
||||
; Limits the extensions of the main script FPM will allow to parse. This can
|
||||
; prevent configuration mistakes on the web server side. You should only limit
|
||||
; FPM to .php extensions to prevent malicious users to use other extensions to
|
||||
; exectute php code.
|
||||
; Note: set an empty value to allow all extensions.
|
||||
; Default Value: .php
|
||||
;security.limit_extensions = .php .php3 .php4 .php5
|
||||
|
||||
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
|
||||
; the current environment.
|
||||
; Default Value: clean env
|
||||
;env[HOSTNAME] = $HOSTNAME
|
||||
env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
;env[TMP] = /tmp
|
||||
;env[TMPDIR] = /tmp
|
||||
;env[TEMP] = /tmp
|
||||
|
||||
; Additional php.ini defines, specific to this pool of workers. These settings
|
||||
; overwrite the values previously defined in the php.ini. The directives are the
|
||||
; same as the PHP SAPI:
|
||||
; php_value/php_flag - you can set classic ini defines which can
|
||||
; be overwritten from PHP call 'ini_set'.
|
||||
; php_admin_value/php_admin_flag - these directives won't be overwritten by
|
||||
; PHP call 'ini_set'
|
||||
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
|
||||
|
||||
; Defining 'extension' will load the corresponding shared extension from
|
||||
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
|
||||
; overwrite previously defined php.ini values, but will append the new value
|
||||
; instead.
|
||||
|
||||
; Note: path INI options can be relative and will be expanded with the prefix
|
||||
; (pool, global or /usr)
|
||||
|
||||
; Default Value: nothing is defined by default except the values in php.ini and
|
||||
; specified at startup with the -d argument
|
||||
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
|
||||
;php_flag[display_errors] = off
|
||||
;php_admin_value[error_log] = /var/log/fpm-php.www.log
|
||||
;php_admin_flag[log_errors] = on
|
||||
;php_admin_value[memory_limit] = 32M
|
10
vagrant/vms/phraseanet-php54-nginx/puphpet/.gitattributes
vendored
Normal file
10
vagrant/vms/phraseanet-php54-nginx/puphpet/.gitattributes
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# Autodetect text files
|
||||
* text=auto
|
||||
|
||||
# Force the following filetypes to have unix eols, so Windows does not break them
|
||||
*.pp text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.yaml text eol=lf
|
||||
Puppetfile text eol=lf
|
||||
.bash_aliases text eol=lf
|
||||
.vimrc text eol=lf
|
287
vagrant/vms/phraseanet-php54-nginx/puphpet/config.yaml
vendored
Normal file
287
vagrant/vms/phraseanet-php54-nginx/puphpet/config.yaml
vendored
Normal file
@@ -0,0 +1,287 @@
|
||||
---
|
||||
vagrantfile-local:
|
||||
name: phraseanet-php54-nginx
|
||||
vm:
|
||||
box: puphpet/debian75-x64
|
||||
box_url: puphpet/debian75-x64
|
||||
hostname: phraseanet-php54-nginx
|
||||
memory: '2048'
|
||||
chosen_provider: virtualbox
|
||||
network:
|
||||
private_network: 192.168.56.101
|
||||
forwarded_port:
|
||||
jjfjpp9VdZ4A:
|
||||
host: '6592'
|
||||
guest: '22'
|
||||
provider:
|
||||
virtualbox:
|
||||
modifyvm:
|
||||
natdnshostresolver1: on
|
||||
setextradata:
|
||||
VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root: 1
|
||||
vmware:
|
||||
numvcpus: 1
|
||||
parallels:
|
||||
cpus: 1
|
||||
provision:
|
||||
puppet:
|
||||
manifests_path: vagrant/vms/phraseanet-php54-nginx/puphpet/puppet
|
||||
manifest_file: manifest.pp
|
||||
module_path: vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules
|
||||
options:
|
||||
- '--verbose'
|
||||
- '--hiera_config /vagrant/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/hiera.yaml'
|
||||
- '--parser future'
|
||||
synced_folder:
|
||||
KaPfJ4CzfgFk:
|
||||
source: ''
|
||||
target: /var/www/phraseanet
|
||||
sync_type: nfs
|
||||
rsync:
|
||||
args: '-z'
|
||||
exclude: .vagrant/
|
||||
auto: 'false'
|
||||
usable_port_range: 2200..2250
|
||||
ssh:
|
||||
host: null
|
||||
port: null
|
||||
private_key_path: null
|
||||
username: vagrant
|
||||
guest_port: null
|
||||
keep_alive: true
|
||||
forward_agent: false
|
||||
forward_x11: false
|
||||
shell: 'bash -l'
|
||||
vagrant:
|
||||
host: detect
|
||||
server:
|
||||
packages:
|
||||
- imagemagick
|
||||
- libevent-dev
|
||||
- ufraw
|
||||
- ffmpeg
|
||||
- ghostscript
|
||||
- xpdf
|
||||
- unoconv
|
||||
- gpac
|
||||
- swftools
|
||||
- openjdk-7-jre
|
||||
- openjdk-7-jdk
|
||||
- locales
|
||||
- libmariadbclient-dev
|
||||
- pkg-config
|
||||
- libzmq-dev
|
||||
- libxml2-dev
|
||||
- libexpat1-dev
|
||||
- libzmq3-dev
|
||||
- re2c
|
||||
- scons
|
||||
- inkscape
|
||||
- python-setuptools
|
||||
- libmemcache0
|
||||
- libimage-exiftool-perl
|
||||
- git
|
||||
- libfreetype6-dev
|
||||
- libgif-dev
|
||||
- libjpeg62-dev
|
||||
dot_files:
|
||||
-
|
||||
bash_aliases: null
|
||||
_prevent_empty: ''
|
||||
mailcatcher:
|
||||
install: '1'
|
||||
settings:
|
||||
smtp_ip: 0.0.0.0
|
||||
smtp_port: 1025
|
||||
http_ip: 0.0.0.0
|
||||
http_port: '1080'
|
||||
mailcatcher_path: /usr/local/bin
|
||||
log_path: /var/log/mailcatcher/mailcatcher.log
|
||||
firewall:
|
||||
install: '0'
|
||||
rules: null
|
||||
hhvm:
|
||||
install: '0'
|
||||
nightly: '1'
|
||||
settings:
|
||||
host: 127.0.0.1
|
||||
port: '9000'
|
||||
apache:
|
||||
install: 0
|
||||
settings:
|
||||
user: www-data
|
||||
group: www-data
|
||||
default_vhost: true
|
||||
manage_user: false
|
||||
manage_group: false
|
||||
sendfile: 0
|
||||
modules:
|
||||
- php
|
||||
- rewrite
|
||||
vhosts:
|
||||
7lQATQxib5dH:
|
||||
servername: awesome.dev
|
||||
serveraliases:
|
||||
- www.awesome.dev
|
||||
docroot: /var/www/awesome
|
||||
port: '80'
|
||||
setenv:
|
||||
- 'APP_ENV dev'
|
||||
override:
|
||||
- All
|
||||
options:
|
||||
- Indexes
|
||||
- FollowSymLinks
|
||||
- MultiViews
|
||||
custom_fragment: ''
|
||||
ssl_cert: ''
|
||||
ssl_key: ''
|
||||
ssl_chain: ''
|
||||
ssl_certs_dir: ''
|
||||
mod_pagespeed: 0
|
||||
mod_spdy: 0
|
||||
nginx:
|
||||
install: '1'
|
||||
settings:
|
||||
default_vhost: 1
|
||||
proxy_buffer_size: 128k
|
||||
proxy_buffers: '4 256k'
|
||||
vhosts:
|
||||
issDOx17O4bn:
|
||||
server_name: nginx.phraseanet
|
||||
server_aliases:
|
||||
- nginx.phrasea.net
|
||||
- nginx.alchemyasp.com
|
||||
www_root: /var/www/phraseanet/www
|
||||
listen_port: '8080'
|
||||
index_files:
|
||||
- index.html
|
||||
- index.htm
|
||||
- index.php
|
||||
envvars:
|
||||
- 'APP_ENV dev'
|
||||
- 'PATH /usr/local/bin:/usr/bin:/bin'
|
||||
ssl: '1'
|
||||
ssl_cert: ''
|
||||
ssl_key: ''
|
||||
php:
|
||||
install: '1'
|
||||
version: '54'
|
||||
composer: '1'
|
||||
composer_home: ''
|
||||
modules:
|
||||
php:
|
||||
- cli
|
||||
- intl
|
||||
- mcrypt
|
||||
- memcache
|
||||
- memcached
|
||||
- curl
|
||||
- gd
|
||||
- imagick
|
||||
- enchant
|
||||
- mysql
|
||||
- mbstring
|
||||
- sqlite
|
||||
pear: { }
|
||||
pecl:
|
||||
- zip
|
||||
- json
|
||||
- amqp
|
||||
- mongo
|
||||
- APC
|
||||
ini:
|
||||
display_errors: On
|
||||
error_reporting: '-1'
|
||||
session.save_path: '/var/lib/php/session'
|
||||
sql.safe_mode: 'false'
|
||||
file_uploads: On
|
||||
session.cache_limiter: Off
|
||||
short_open_tag: Off
|
||||
session.auto_start: Off
|
||||
allow_url_fopen: On
|
||||
session.hash_bits_per_character: '6'
|
||||
session.hash_function: On
|
||||
session.use_only_cookies: On
|
||||
session.use_cookies: On
|
||||
upload_max_filesize: '2000M'
|
||||
post_max_size: '2000M'
|
||||
timezone: Europe/Paris
|
||||
xdebug:
|
||||
install: '1'
|
||||
settings:
|
||||
xdebug.default_enable: '1'
|
||||
xdebug.remote_autostart: '0'
|
||||
xdebug.remote_connect_back: '1'
|
||||
xdebug.remote_enable: '1'
|
||||
xdebug.remote_handler: dbgp
|
||||
xdebug.remote_port: '9000'
|
||||
xdebug.max_nesting_level: '1000'
|
||||
drush:
|
||||
install: 0
|
||||
settings:
|
||||
drush.tag_branch: 6.x
|
||||
mysql:
|
||||
install: 0
|
||||
root_password: '123'
|
||||
adminer: 0
|
||||
databases:
|
||||
AClrSlhQehoc:
|
||||
grant:
|
||||
- ALL
|
||||
name: dbname
|
||||
host: localhost
|
||||
user: dbuser
|
||||
password: '123'
|
||||
sql_file: ''
|
||||
postgresql:
|
||||
install: 0
|
||||
settings:
|
||||
root_password: '123'
|
||||
user_group: postgres
|
||||
encoding: UTF8
|
||||
version: '9.3'
|
||||
databases: { }
|
||||
adminer: 0
|
||||
mariadb:
|
||||
install: '1'
|
||||
root_password: toor
|
||||
adminer: '0'
|
||||
databases: { }
|
||||
version: '10.0'
|
||||
sqlite:
|
||||
install: '1'
|
||||
adminer: '0'
|
||||
databases: { }
|
||||
mongodb:
|
||||
install: '1'
|
||||
settings:
|
||||
auth: 1
|
||||
port: '27017'
|
||||
databases: { }
|
||||
redis:
|
||||
install: '1'
|
||||
settings:
|
||||
conf_port: '6379'
|
||||
beanstalkd:
|
||||
install: 0
|
||||
settings:
|
||||
listenaddress: 0.0.0.0
|
||||
listenport: '13000'
|
||||
maxjobsize: '65535'
|
||||
maxconnections: '1024'
|
||||
binlogdir: /var/lib/beanstalkd/binlog
|
||||
binlogfsync: null
|
||||
binlogsize: '10485760'
|
||||
beanstalk_console: 0
|
||||
binlogdir: /var/lib/beanstalkd/binlog
|
||||
rabbitmq:
|
||||
install: '1'
|
||||
settings:
|
||||
port: '5672'
|
||||
elastic_search:
|
||||
install: '1'
|
||||
settings:
|
||||
java_install: true
|
||||
autoupgrade: true
|
||||
|
52
vagrant/vms/phraseanet-php54-nginx/puphpet/files/dot/.bash_aliases
vendored
Normal file
52
vagrant/vms/phraseanet-php54-nginx/puphpet/files/dot/.bash_aliases
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
if [ -f /etc/bash_completion ]; then
|
||||
source /etc/bash_completion
|
||||
fi
|
||||
|
||||
__has_parent_dir () {
|
||||
# Utility function so we can test for things like .git/.hg without firing up a
|
||||
# separate process
|
||||
test -d "$1" && return 0;
|
||||
|
||||
current="."
|
||||
while [ ! "$current" -ef "$current/.." ]; do
|
||||
if [ -d "$current/$1" ]; then
|
||||
return 0;
|
||||
fi
|
||||
current="$current/..";
|
||||
done
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
__vcs_name() {
|
||||
if [ -d .svn ]; then
|
||||
echo "-[svn]";
|
||||
elif __has_parent_dir ".git"; then
|
||||
echo "-[$(__git_ps1 'git %s')]";
|
||||
elif __has_parent_dir ".hg"; then
|
||||
echo "-[hg $(hg branch)]"
|
||||
fi
|
||||
}
|
||||
|
||||
black=$(tput -Txterm setaf 0)
|
||||
red=$(tput -Txterm setaf 1)
|
||||
green=$(tput -Txterm setaf 2)
|
||||
yellow=$(tput -Txterm setaf 3)
|
||||
dk_blue=$(tput -Txterm setaf 4)
|
||||
pink=$(tput -Txterm setaf 5)
|
||||
lt_blue=$(tput -Txterm setaf 6)
|
||||
|
||||
bold=$(tput -Txterm bold)
|
||||
reset=$(tput -Txterm sgr0)
|
||||
|
||||
# Nicely formatted terminal prompt
|
||||
export PS1='\n\[$bold\]\[$black\][\[$dk_blue\]\@\[$black\]]-[\[$green\]\u\[$yellow\]@\[$green\]\h\[$black\]]-[\[$pink\]\w\[$black\]]\[\033[0;33m\]$(__vcs_name) \[\033[00m\]\[$reset\]\n\[$reset\]\$ '
|
||||
|
||||
alias ls='ls -F --color=always'
|
||||
alias dir='dir -F --color=always'
|
||||
alias ll='ls -l'
|
||||
alias cp='cp -iv'
|
||||
alias rm='rm -i'
|
||||
alias mv='mv -iv'
|
||||
alias grep='grep --color=auto -in'
|
||||
alias ..='cd ..'
|
491
vagrant/vms/phraseanet-php54-nginx/puphpet/files/dot/.bash_git
vendored
Normal file
491
vagrant/vms/phraseanet-php54-nginx/puphpet/files/dot/.bash_git
vendored
Normal file
@@ -0,0 +1,491 @@
|
||||
# bash/zsh git prompt support
|
||||
#
|
||||
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
|
||||
# Distributed under the GNU General Public License, version 2.0.
|
||||
#
|
||||
# This script allows you to see repository status in your prompt.
|
||||
#
|
||||
# To enable:
|
||||
#
|
||||
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
|
||||
# 2) Add the following line to your .bashrc/.zshrc:
|
||||
# source ~/.git-prompt.sh
|
||||
# 3a) Change your PS1 to call __git_ps1 as
|
||||
# command-substitution:
|
||||
# Bash: PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
|
||||
# ZSH: setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ '
|
||||
# the optional argument will be used as format string.
|
||||
# 3b) Alternatively, for a slightly faster prompt, __git_ps1 can
|
||||
# be used for PROMPT_COMMAND in Bash or for precmd() in Zsh
|
||||
# with two parameters, <pre> and <post>, which are strings
|
||||
# you would put in $PS1 before and after the status string
|
||||
# generated by the git-prompt machinery. e.g.
|
||||
# Bash: PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
|
||||
# will show username, at-sign, host, colon, cwd, then
|
||||
# various status string, followed by dollar and SP, as
|
||||
# your prompt.
|
||||
# ZSH: precmd () { __git_ps1 "%n" ":%~$ " "|%s" }
|
||||
# will show username, pipe, then various status string,
|
||||
# followed by colon, cwd, dollar and SP, as your prompt.
|
||||
# Optionally, you can supply a third argument with a printf
|
||||
# format string to finetune the output of the branch status
|
||||
#
|
||||
# The repository status will be displayed only if you are currently in a
|
||||
# git repository. The %s token is the placeholder for the shown status.
|
||||
#
|
||||
# The prompt status always includes the current branch name.
|
||||
#
|
||||
# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,
|
||||
# unstaged (*) and staged (+) changes will be shown next to the branch
|
||||
# name. You can configure this per-repository with the
|
||||
# bash.showDirtyState variable, which defaults to true once
|
||||
# GIT_PS1_SHOWDIRTYSTATE is enabled.
|
||||
#
|
||||
# You can also see if currently something is stashed, by setting
|
||||
# GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed,
|
||||
# then a '$' will be shown next to the branch name.
|
||||
#
|
||||
# If you would like to see if there're untracked files, then you can set
|
||||
# GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're untracked
|
||||
# files, then a '%' will be shown next to the branch name. You can
|
||||
# configure this per-repository with the bash.showUntrackedFiles
|
||||
# variable, which defaults to true once GIT_PS1_SHOWUNTRACKEDFILES is
|
||||
# enabled.
|
||||
#
|
||||
# If you would like to see the difference between HEAD and its upstream,
|
||||
# set GIT_PS1_SHOWUPSTREAM="auto". A "<" indicates you are behind, ">"
|
||||
# indicates you are ahead, "<>" indicates you have diverged and "="
|
||||
# indicates that there is no difference. You can further control
|
||||
# behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated list
|
||||
# of values:
|
||||
#
|
||||
# verbose show number of commits ahead/behind (+/-) upstream
|
||||
# name if verbose, then also show the upstream abbrev name
|
||||
# legacy don't use the '--count' option available in recent
|
||||
# versions of git-rev-list
|
||||
# git always compare HEAD to @{upstream}
|
||||
# svn always compare HEAD to your SVN upstream
|
||||
#
|
||||
# By default, __git_ps1 will compare HEAD to your SVN upstream if it can
|
||||
# find one, or @{upstream} otherwise. Once you have set
|
||||
# GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by
|
||||
# setting the bash.showUpstream config variable.
|
||||
#
|
||||
# If you would like to see more information about the identity of
|
||||
# commits checked out as a detached HEAD, set GIT_PS1_DESCRIBE_STYLE
|
||||
# to one of these values:
|
||||
#
|
||||
# contains relative to newer annotated tag (v1.6.3.2~35)
|
||||
# branch relative to newer tag or branch (master~4)
|
||||
# describe relative to older annotated tag (v1.6.3.1-13-gdd42c2f)
|
||||
# default exactly matching tag
|
||||
#
|
||||
# If you would like a colored hint about the current dirty state, set
|
||||
# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on
|
||||
# the colored output of "git status -sb" and are available only when
|
||||
# using __git_ps1 for PROMPT_COMMAND or precmd.
|
||||
|
||||
# check whether printf supports -v
|
||||
__git_printf_supports_v=
|
||||
printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1
|
||||
|
||||
# stores the divergence from upstream in $p
|
||||
# used by GIT_PS1_SHOWUPSTREAM
|
||||
__git_ps1_show_upstream ()
|
||||
{
|
||||
local key value
|
||||
local svn_remote svn_url_pattern count n
|
||||
local upstream=git legacy="" verbose="" name=""
|
||||
|
||||
svn_remote=()
|
||||
# get some config options from git-config
|
||||
local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
|
||||
while read -r key value; do
|
||||
case "$key" in
|
||||
bash.showupstream)
|
||||
GIT_PS1_SHOWUPSTREAM="$value"
|
||||
if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then
|
||||
p=""
|
||||
return
|
||||
fi
|
||||
;;
|
||||
svn-remote.*.url)
|
||||
svn_remote[$((${#svn_remote[@]} + 1))]="$value"
|
||||
svn_url_pattern="$svn_url_pattern\\|$value"
|
||||
upstream=svn+git # default upstream is SVN if available, else git
|
||||
;;
|
||||
esac
|
||||
done <<< "$output"
|
||||
|
||||
# parse configuration values
|
||||
for option in ${GIT_PS1_SHOWUPSTREAM}; do
|
||||
case "$option" in
|
||||
git|svn) upstream="$option" ;;
|
||||
verbose) verbose=1 ;;
|
||||
legacy) legacy=1 ;;
|
||||
name) name=1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Find our upstream
|
||||
case "$upstream" in
|
||||
git) upstream="@{upstream}" ;;
|
||||
svn*)
|
||||
# get the upstream from the "git-svn-id: ..." in a commit message
|
||||
# (git-svn uses essentially the same procedure internally)
|
||||
local -a svn_upstream
|
||||
svn_upstream=($(git log --first-parent -1 \
|
||||
--grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null))
|
||||
if [[ 0 -ne ${#svn_upstream[@]} ]]; then
|
||||
svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]}
|
||||
svn_upstream=${svn_upstream%@*}
|
||||
local n_stop="${#svn_remote[@]}"
|
||||
for ((n=1; n <= n_stop; n++)); do
|
||||
svn_upstream=${svn_upstream#${svn_remote[$n]}}
|
||||
done
|
||||
|
||||
if [[ -z "$svn_upstream" ]]; then
|
||||
# default branch name for checkouts with no layout:
|
||||
upstream=${GIT_SVN_ID:-git-svn}
|
||||
else
|
||||
upstream=${svn_upstream#/}
|
||||
fi
|
||||
elif [[ "svn+git" = "$upstream" ]]; then
|
||||
upstream="@{upstream}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Find how many commits we are ahead/behind our upstream
|
||||
if [[ -z "$legacy" ]]; then
|
||||
count="$(git rev-list --count --left-right \
|
||||
"$upstream"...HEAD 2>/dev/null)"
|
||||
else
|
||||
# produce equivalent output to --count for older versions of git
|
||||
local commits
|
||||
if commits="$(git rev-list --left-right "$upstream"...HEAD 2>/dev/null)"
|
||||
then
|
||||
local commit behind=0 ahead=0
|
||||
for commit in $commits
|
||||
do
|
||||
case "$commit" in
|
||||
"<"*) ((behind++)) ;;
|
||||
*) ((ahead++)) ;;
|
||||
esac
|
||||
done
|
||||
count="$behind $ahead"
|
||||
else
|
||||
count=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# calculate the result
|
||||
if [[ -z "$verbose" ]]; then
|
||||
case "$count" in
|
||||
"") # no upstream
|
||||
p="" ;;
|
||||
"0 0") # equal to upstream
|
||||
p="=" ;;
|
||||
"0 "*) # ahead of upstream
|
||||
p=">" ;;
|
||||
*" 0") # behind upstream
|
||||
p="<" ;;
|
||||
*) # diverged from upstream
|
||||
p="<>" ;;
|
||||
esac
|
||||
else
|
||||
case "$count" in
|
||||
"") # no upstream
|
||||
p="" ;;
|
||||
"0 0") # equal to upstream
|
||||
p=" u=" ;;
|
||||
"0 "*) # ahead of upstream
|
||||
p=" u+${count#0 }" ;;
|
||||
*" 0") # behind upstream
|
||||
p=" u-${count% 0}" ;;
|
||||
*) # diverged from upstream
|
||||
p=" u+${count#* }-${count% *}" ;;
|
||||
esac
|
||||
if [[ -n "$count" && -n "$name" ]]; then
|
||||
__git_ps1_upstream_name=$(git rev-parse \
|
||||
--abbrev-ref "$upstream" 2>/dev/null)
|
||||
if [ $pcmode = yes ]; then
|
||||
# see the comments around the
|
||||
# __git_ps1_branch_name variable below
|
||||
p="$p \${__git_ps1_upstream_name}"
|
||||
else
|
||||
p="$p ${__git_ps1_upstream_name}"
|
||||
# not needed anymore; keep user's
|
||||
# environment clean
|
||||
unset __git_ps1_upstream_name
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# Helper function that is meant to be called from __git_ps1. It
|
||||
# injects color codes into the appropriate gitstring variables used
|
||||
# to build a gitstring.
|
||||
__git_ps1_colorize_gitstring ()
|
||||
{
|
||||
if [[ -n ${ZSH_VERSION-} ]]; then
|
||||
local c_red='%F{red}'
|
||||
local c_green='%F{green}'
|
||||
local c_lblue='%F{blue}'
|
||||
local c_clear='%f'
|
||||
else
|
||||
# Using \[ and \] around colors is necessary to prevent
|
||||
# issues with command line editing/browsing/completion!
|
||||
local c_red='\[\e[31m\]'
|
||||
local c_green='\[\e[32m\]'
|
||||
local c_lblue='\[\e[1;34m\]'
|
||||
local c_clear='\[\e[0m\]'
|
||||
fi
|
||||
local bad_color=$c_red
|
||||
local ok_color=$c_green
|
||||
local flags_color="$c_lblue"
|
||||
|
||||
local branch_color=""
|
||||
if [ $detached = no ]; then
|
||||
branch_color="$ok_color"
|
||||
else
|
||||
branch_color="$bad_color"
|
||||
fi
|
||||
c="$branch_color$c"
|
||||
|
||||
z="$c_clear$z"
|
||||
if [ "$w" = "*" ]; then
|
||||
w="$bad_color$w"
|
||||
fi
|
||||
if [ -n "$i" ]; then
|
||||
i="$ok_color$i"
|
||||
fi
|
||||
if [ -n "$s" ]; then
|
||||
s="$flags_color$s"
|
||||
fi
|
||||
if [ -n "$u" ]; then
|
||||
u="$bad_color$u"
|
||||
fi
|
||||
r="$c_clear$r"
|
||||
}
|
||||
|
||||
__git_eread ()
|
||||
{
|
||||
f="$1"
|
||||
shift
|
||||
test -r "$f" && read "$@" <"$f"
|
||||
}
|
||||
|
||||
# __git_ps1 accepts 0 or 1 arguments (i.e., format string)
|
||||
# when called from PS1 using command substitution
|
||||
# in this mode it prints text to add to bash PS1 prompt (includes branch name)
|
||||
#
|
||||
# __git_ps1 requires 2 or 3 arguments when called from PROMPT_COMMAND (pc)
|
||||
# in that case it _sets_ PS1. The arguments are parts of a PS1 string.
|
||||
# when two arguments are given, the first is prepended and the second appended
|
||||
# to the state string when assigned to PS1.
|
||||
# The optional third parameter will be used as printf format string to further
|
||||
# customize the output of the git-status string.
|
||||
# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true
|
||||
__git_ps1 ()
|
||||
{
|
||||
local pcmode=no
|
||||
local detached=no
|
||||
local ps1pc_start='\u@\h:\w '
|
||||
local ps1pc_end='\$ '
|
||||
local printf_format=' (%s)'
|
||||
|
||||
case "$#" in
|
||||
2|3) pcmode=yes
|
||||
ps1pc_start="$1"
|
||||
ps1pc_end="$2"
|
||||
printf_format="${3:-$printf_format}"
|
||||
;;
|
||||
0|1) printf_format="${1:-$printf_format}"
|
||||
;;
|
||||
*) return
|
||||
;;
|
||||
esac
|
||||
|
||||
local repo_info rev_parse_exit_code
|
||||
repo_info="$(git rev-parse --git-dir --is-inside-git-dir \
|
||||
--is-bare-repository --is-inside-work-tree \
|
||||
--short HEAD 2>/dev/null)"
|
||||
rev_parse_exit_code="$?"
|
||||
|
||||
if [ -z "$repo_info" ]; then
|
||||
if [ $pcmode = yes ]; then
|
||||
#In PC mode PS1 always needs to be set
|
||||
PS1="$ps1pc_start$ps1pc_end"
|
||||
fi
|
||||
return
|
||||
fi
|
||||
|
||||
local short_sha
|
||||
if [ "$rev_parse_exit_code" = "0" ]; then
|
||||
short_sha="${repo_info##*$'\n'}"
|
||||
repo_info="${repo_info%$'\n'*}"
|
||||
fi
|
||||
local inside_worktree="${repo_info##*$'\n'}"
|
||||
repo_info="${repo_info%$'\n'*}"
|
||||
local bare_repo="${repo_info##*$'\n'}"
|
||||
repo_info="${repo_info%$'\n'*}"
|
||||
local inside_gitdir="${repo_info##*$'\n'}"
|
||||
local g="${repo_info%$'\n'*}"
|
||||
|
||||
local r=""
|
||||
local b=""
|
||||
local step=""
|
||||
local total=""
|
||||
if [ -d "$g/rebase-merge" ]; then
|
||||
__git_eread "$g/rebase-merge/head-name" b
|
||||
__git_eread "$g/rebase-merge/msgnum" step
|
||||
__git_eread "$g/rebase-merge/end" total
|
||||
if [ -f "$g/rebase-merge/interactive" ]; then
|
||||
r="|REBASE-i"
|
||||
else
|
||||
r="|REBASE-m"
|
||||
fi
|
||||
else
|
||||
if [ -d "$g/rebase-apply" ]; then
|
||||
__git_eread "$g/rebase-apply/next" step
|
||||
__git_eread "$g/rebase-apply/last" total
|
||||
if [ -f "$g/rebase-apply/rebasing" ]; then
|
||||
__git_eread "$g/rebase-apply/head-name" b
|
||||
r="|REBASE"
|
||||
elif [ -f "$g/rebase-apply/applying" ]; then
|
||||
r="|AM"
|
||||
else
|
||||
r="|AM/REBASE"
|
||||
fi
|
||||
elif [ -f "$g/MERGE_HEAD" ]; then
|
||||
r="|MERGING"
|
||||
elif [ -f "$g/CHERRY_PICK_HEAD" ]; then
|
||||
r="|CHERRY-PICKING"
|
||||
elif [ -f "$g/REVERT_HEAD" ]; then
|
||||
r="|REVERTING"
|
||||
elif [ -f "$g/BISECT_LOG" ]; then
|
||||
r="|BISECTING"
|
||||
fi
|
||||
|
||||
if [ -n "$b" ]; then
|
||||
:
|
||||
elif [ -h "$g/HEAD" ]; then
|
||||
# symlink symbolic ref
|
||||
b="$(git symbolic-ref HEAD 2>/dev/null)"
|
||||
else
|
||||
local head=""
|
||||
if ! __git_eread "$g/HEAD" head; then
|
||||
if [ $pcmode = yes ]; then
|
||||
PS1="$ps1pc_start$ps1pc_end"
|
||||
fi
|
||||
return
|
||||
fi
|
||||
# is it a symbolic ref?
|
||||
b="${head#ref: }"
|
||||
if [ "$head" = "$b" ]; then
|
||||
detached=yes
|
||||
b="$(
|
||||
case "${GIT_PS1_DESCRIBE_STYLE-}" in
|
||||
(contains)
|
||||
git describe --contains HEAD ;;
|
||||
(branch)
|
||||
git describe --contains --all HEAD ;;
|
||||
(describe)
|
||||
git describe HEAD ;;
|
||||
(* | default)
|
||||
git describe --tags --exact-match HEAD ;;
|
||||
esac 2>/dev/null)" ||
|
||||
|
||||
b="$short_sha..."
|
||||
b="($b)"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$step" ] && [ -n "$total" ]; then
|
||||
r="$r $step/$total"
|
||||
fi
|
||||
|
||||
local w=""
|
||||
local i=""
|
||||
local s=""
|
||||
local u=""
|
||||
local c=""
|
||||
local p=""
|
||||
|
||||
if [ "true" = "$inside_gitdir" ]; then
|
||||
if [ "true" = "$bare_repo" ]; then
|
||||
c="BARE:"
|
||||
else
|
||||
b="GIT_DIR!"
|
||||
fi
|
||||
elif [ "true" = "$inside_worktree" ]; then
|
||||
if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
|
||||
[ "$(git config --bool bash.showDirtyState)" != "false" ]
|
||||
then
|
||||
git diff --no-ext-diff --quiet --exit-code || w="*"
|
||||
if [ -n "$short_sha" ]; then
|
||||
git diff-index --cached --quiet HEAD -- || i="+"
|
||||
else
|
||||
i="#"
|
||||
fi
|
||||
fi
|
||||
if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
|
||||
[ -r "$g/refs/stash" ]; then
|
||||
s="$"
|
||||
fi
|
||||
|
||||
if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
|
||||
[ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
|
||||
git ls-files --others --exclude-standard --error-unmatch -- '*' >/dev/null 2>/dev/null
|
||||
then
|
||||
u="%${ZSH_VERSION+%}"
|
||||
fi
|
||||
|
||||
if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then
|
||||
__git_ps1_show_upstream
|
||||
fi
|
||||
fi
|
||||
|
||||
local z="${GIT_PS1_STATESEPARATOR-" "}"
|
||||
|
||||
# NO color option unless in PROMPT_COMMAND mode
|
||||
if [ $pcmode = yes ] && [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
|
||||
__git_ps1_colorize_gitstring
|
||||
fi
|
||||
|
||||
b=${b##refs/heads/}
|
||||
if [ $pcmode = yes ]; then
|
||||
# In pcmode (and only pcmode) the contents of
|
||||
# $gitstring are subject to expansion by the shell.
|
||||
# Avoid putting the raw ref name in the prompt to
|
||||
# protect the user from arbitrary code execution via
|
||||
# specially crafted ref names (e.g., a ref named
|
||||
# '$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)' would execute
|
||||
# 'sudo rm -rf /' when the prompt is drawn). Instead,
|
||||
# put the ref name in a new global variable (in the
|
||||
# __git_ps1_* namespace to avoid colliding with the
|
||||
# user's environment) and reference that variable from
|
||||
# PS1.
|
||||
__git_ps1_branch_name=$b
|
||||
# note that the $ is escaped -- the variable will be
|
||||
# expanded later (when it's time to draw the prompt)
|
||||
b="\${__git_ps1_branch_name}"
|
||||
fi
|
||||
|
||||
local f="$w$i$s$u"
|
||||
local gitstring="$c$b${f:+$z$f}$r$p"
|
||||
|
||||
if [ $pcmode = yes ]; then
|
||||
if [ "${__git_printf_supports_v-}" != yes ]; then
|
||||
gitstring=$(printf -- "$printf_format" "$gitstring")
|
||||
else
|
||||
printf -v gitstring -- "$printf_format" "$gitstring"
|
||||
fi
|
||||
PS1="$ps1pc_start$gitstring$ps1pc_end"
|
||||
else
|
||||
printf -- "$printf_format" "$gitstring"
|
||||
fi
|
||||
}
|
414
vagrant/vms/phraseanet-php54-nginx/puphpet/files/dot/.vimrc
vendored
Normal file
414
vagrant/vms/phraseanet-php54-nginx/puphpet/files/dot/.vimrc
vendored
Normal file
@@ -0,0 +1,414 @@
|
||||
set rtp+=$GOROOT/misc/vim
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Maintainer:
|
||||
" Amir Salihefendic
|
||||
" http://amix.dk - amix@amix.dk
|
||||
"
|
||||
" Version:
|
||||
" 5.0 - 29/05/12 15:43:36
|
||||
"
|
||||
" Blog_post:
|
||||
" http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github
|
||||
"
|
||||
" Awesome_version:
|
||||
" Get this config, nice color schemes and lots of plugins!
|
||||
"
|
||||
" Install the awesome version from:
|
||||
"
|
||||
" https://github.com/amix/vimrc
|
||||
"
|
||||
" Syntax_highlighted:
|
||||
" http://amix.dk/vim/vimrc.html
|
||||
"
|
||||
" Raw_version:
|
||||
" http://amix.dk/vim/vimrc.txt
|
||||
"
|
||||
" Sections:
|
||||
" -> General
|
||||
" -> VIM user interface
|
||||
" -> Colors and Fonts
|
||||
" -> Files and backups
|
||||
" -> Text, tab and indent related
|
||||
" -> Visual mode related
|
||||
" -> Moving around, tabs and buffers
|
||||
" -> Status line
|
||||
" -> Editing mappings
|
||||
" -> vimgrep searching and cope displaying
|
||||
" -> Spell checking
|
||||
" -> Misc
|
||||
" -> Helper functions
|
||||
"
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => General
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Sets how many lines of history VIM has to remember
|
||||
set history=700
|
||||
|
||||
" Enable filetype plugins
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
|
||||
" Set to auto read when a file is changed from the outside
|
||||
set autoread
|
||||
|
||||
" With a map leader it's possible to do extra key combinations
|
||||
" like <leader>w saves the current file
|
||||
let mapleader = ","
|
||||
let g:mapleader = ","
|
||||
|
||||
" Fast saving
|
||||
nmap <leader>w :w!<cr>
|
||||
|
||||
" :W sudo saves the file
|
||||
" (useful for handling the permission-denied error)
|
||||
command W w !sudo tee % > /dev/null
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => VIM user interface
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Set 7 lines to the cursor - when moving vertically using j/k
|
||||
set so=7
|
||||
|
||||
" Turn on the WiLd menu
|
||||
set wildmenu
|
||||
|
||||
" Ignore compiled files
|
||||
set wildignore=*.o,*~,*.pyc
|
||||
if has("win16") || has("win32")
|
||||
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
|
||||
else
|
||||
set wildignore+=.git\*,.hg\*,.svn\*
|
||||
endif
|
||||
|
||||
"Always show current position
|
||||
set ruler
|
||||
|
||||
" Height of the command bar
|
||||
set cmdheight=2
|
||||
|
||||
" A buffer becomes hidden when it is abandoned
|
||||
set hid
|
||||
|
||||
" Configure backspace so it acts as it should act
|
||||
set backspace=eol,start,indent
|
||||
set whichwrap+=<,>,h,l
|
||||
|
||||
" Ignore case when searching
|
||||
set ignorecase
|
||||
|
||||
" When searching try to be smart about cases
|
||||
set smartcase
|
||||
|
||||
" Highlight search results
|
||||
set hlsearch
|
||||
|
||||
" Makes search act like search in modern browsers
|
||||
set incsearch
|
||||
|
||||
" Don't redraw while executing macros (good performance config)
|
||||
set lazyredraw
|
||||
|
||||
" For regular expressions turn magic on
|
||||
set magic
|
||||
|
||||
" Show matching brackets when text indicator is over them
|
||||
set showmatch
|
||||
" How many tenths of a second to blink when matching brackets
|
||||
set mat=2
|
||||
|
||||
" No annoying sound on errors
|
||||
set noerrorbells
|
||||
set novisualbell
|
||||
set t_vb=
|
||||
set tm=500
|
||||
|
||||
" Add a bit extra margin to the left
|
||||
set foldcolumn=1
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Colors and Fonts
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Enable syntax highlighting
|
||||
syntax enable
|
||||
|
||||
try
|
||||
colorscheme desert
|
||||
catch
|
||||
endtry
|
||||
|
||||
set background=dark
|
||||
|
||||
" Set extra options when running in GUI mode
|
||||
if has("gui_running")
|
||||
set guioptions-=T
|
||||
set guioptions-=e
|
||||
set t_Co=256
|
||||
set guitablabel=%M\ %t
|
||||
endif
|
||||
|
||||
" Set utf8 as standard encoding and en_US as the standard language
|
||||
set encoding=utf8
|
||||
|
||||
" Use Unix as the standard file type
|
||||
set ffs=unix,dos,mac
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Files, backups and undo
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Turn backup off, since most stuff is in SVN, git et.c anyway...
|
||||
set nobackup
|
||||
set nowb
|
||||
set noswapfile
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Text, tab and indent related
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Use spaces instead of tabs
|
||||
set expandtab
|
||||
|
||||
" Be smart when using tabs ;)
|
||||
set smarttab
|
||||
|
||||
" 1 tab == 4 spaces
|
||||
set shiftwidth=4
|
||||
set tabstop=4
|
||||
|
||||
" Linebreak on 500 characters
|
||||
set lbr
|
||||
set tw=500
|
||||
|
||||
set ai "Auto indent
|
||||
set si "Smart indent
|
||||
set wrap "Wrap lines
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""
|
||||
" => Visual mode related
|
||||
""""""""""""""""""""""""""""""
|
||||
" Visual mode pressing * or # searches for the current selection
|
||||
" Super useful! From an idea by Michael Naumann
|
||||
vnoremap <silent> * :call VisualSelection('f', '')<CR>
|
||||
vnoremap <silent> # :call VisualSelection('b', '')<CR>
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Moving around, tabs, windows and buffers
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Treat long lines as break lines (useful when moving around in them)
|
||||
map j gj
|
||||
map k gk
|
||||
|
||||
" Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
|
||||
map <space> /
|
||||
map <c-space> ?
|
||||
|
||||
" Disable highlight when <leader><cr> is pressed
|
||||
map <silent> <leader><cr> :noh<cr>
|
||||
|
||||
" Smart way to move between windows
|
||||
map <C-j> <C-W>j
|
||||
map <C-k> <C-W>k
|
||||
map <C-h> <C-W>h
|
||||
map <C-l> <C-W>l
|
||||
|
||||
" Close the current buffer
|
||||
map <leader>bd :Bclose<cr>
|
||||
|
||||
" Close all the buffers
|
||||
map <leader>ba :1,1000 bd!<cr>
|
||||
|
||||
" Useful mappings for managing tabs
|
||||
map <leader>tn :tabnew<cr>
|
||||
map <leader>to :tabonly<cr>
|
||||
map <leader>tc :tabclose<cr>
|
||||
map <leader>tm :tabmove
|
||||
map <leader>t<leader> :tabnext
|
||||
|
||||
" Opens a new tab with the current buffer's path
|
||||
" Super useful when editing files in the same directory
|
||||
map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/
|
||||
|
||||
" Switch CWD to the directory of the open buffer
|
||||
map <leader>cd :cd %:p:h<cr>:pwd<cr>
|
||||
|
||||
" Specify the behavior when switching between buffers
|
||||
try
|
||||
set switchbuf=useopen,usetab,newtab
|
||||
set stal=2
|
||||
catch
|
||||
endtry
|
||||
|
||||
" Return to last edit position when opening files (You want this!)
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
||||
\ exe "normal! g`\"" |
|
||||
\ endif
|
||||
" Remember info about open buffers on close
|
||||
set viminfo^=%
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""
|
||||
" => Status line
|
||||
""""""""""""""""""""""""""""""
|
||||
" Always show the status line
|
||||
set laststatus=2
|
||||
|
||||
" Format the status line
|
||||
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Editing mappings
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Remap VIM 0 to first non-blank character
|
||||
map 0 ^
|
||||
|
||||
" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac
|
||||
nmap <M-j> mz:m+<cr>`z
|
||||
nmap <M-k> mz:m-2<cr>`z
|
||||
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
|
||||
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
|
||||
|
||||
if has("mac") || has("macunix")
|
||||
nmap <D-j> <M-j>
|
||||
nmap <D-k> <M-k>
|
||||
vmap <D-j> <M-j>
|
||||
vmap <D-k> <M-k>
|
||||
endif
|
||||
|
||||
" Delete trailing white space on save, useful for Python and CoffeeScript ;)
|
||||
func! DeleteTrailingWS()
|
||||
exe "normal mz"
|
||||
%s/\s\+$//ge
|
||||
exe "normal `z"
|
||||
endfunc
|
||||
autocmd BufWrite *.py :call DeleteTrailingWS()
|
||||
autocmd BufWrite *.coffee :call DeleteTrailingWS()
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => vimgrep searching and cope displaying
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" When you press gv you vimgrep after the selected text
|
||||
vnoremap <silent> gv :call VisualSelection('gv', '')<CR>
|
||||
|
||||
" Open vimgrep and put the cursor in the right position
|
||||
map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left>
|
||||
|
||||
" Vimgreps in the current file
|
||||
map <leader><space> :vimgrep // <C-R>%<C-A><right><right><right><right><right><right><right><right><right>
|
||||
|
||||
" When you press <leader>r you can search and replace the selected text
|
||||
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
|
||||
|
||||
" Do :help cope if you are unsure what cope is. It's super useful!
|
||||
"
|
||||
" When you search with vimgrep, display your results in cope by doing:
|
||||
" <leader>cc
|
||||
"
|
||||
" To go to the next search result do:
|
||||
" <leader>n
|
||||
"
|
||||
" To go to the previous search results do:
|
||||
" <leader>p
|
||||
"
|
||||
map <leader>cc :botright cope<cr>
|
||||
map <leader>co ggVGy:tabnew<cr>:set syntax=qf<cr>pgg
|
||||
map <leader>n :cn<cr>
|
||||
map <leader>p :cp<cr>
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Spell checking
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Pressing ,ss will toggle and untoggle spell checking
|
||||
map <leader>ss :setlocal spell!<cr>
|
||||
|
||||
" Shortcuts using <leader>
|
||||
map <leader>sn ]s
|
||||
map <leader>sp [s
|
||||
map <leader>sa zg
|
||||
map <leader>s? z=
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Misc
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Remove the Windows ^M - when the encodings gets messed up
|
||||
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
|
||||
|
||||
" Quickly open a buffer for scripbble
|
||||
map <leader>q :e ~/buffer<cr>
|
||||
|
||||
" Toggle paste mode on and off
|
||||
map <leader>pp :setlocal paste!<cr>
|
||||
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Helper functions
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
function! CmdLine(str)
|
||||
exe "menu Foo.Bar :" . a:str
|
||||
emenu Foo.Bar
|
||||
unmenu Foo
|
||||
endfunction
|
||||
|
||||
function! VisualSelection(direction, extra_filter) range
|
||||
let l:saved_reg = @"
|
||||
execute "normal! vgvy"
|
||||
|
||||
let l:pattern = escape(@", '\\/.*$^~[]')
|
||||
let l:pattern = substitute(l:pattern, "\n$", "", "")
|
||||
|
||||
if a:direction == 'b'
|
||||
execute "normal ?" . l:pattern . "^M"
|
||||
elseif a:direction == 'gv'
|
||||
call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.' . a:extra_filter)
|
||||
elseif a:direction == 'replace'
|
||||
call CmdLine("%s" . '/'. l:pattern . '/')
|
||||
elseif a:direction == 'f'
|
||||
execute "normal /" . l:pattern . "^M"
|
||||
endif
|
||||
|
||||
let @/ = l:pattern
|
||||
let @" = l:saved_reg
|
||||
endfunction
|
||||
|
||||
|
||||
" Returns true if paste mode is enabled
|
||||
function! HasPaste()
|
||||
if &paste
|
||||
return 'PASTE MODE '
|
||||
en
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
" Don't close window, when deleting a buffer
|
||||
command! Bclose call <SID>BufcloseCloseIt()
|
||||
function! <SID>BufcloseCloseIt()
|
||||
let l:currentBufNum = bufnr("%")
|
||||
let l:alternateBufNum = bufnr("#")
|
||||
|
||||
if buflisted(l:alternateBufNum)
|
||||
buffer #
|
||||
else
|
||||
bnext
|
||||
endif
|
||||
|
||||
if bufnr("%") == l:currentBufNum
|
||||
new
|
||||
endif
|
||||
|
||||
if buflisted(l:currentBufNum)
|
||||
execute("bdelete! ".l:currentBufNum)
|
||||
endif
|
||||
endfunction
|
27
vagrant/vms/phraseanet-php54-nginx/puphpet/files/dot/ssh/insecure_private_key
vendored
Normal file
27
vagrant/vms/phraseanet-php54-nginx/puphpet/files/dot/ssh/insecure_private_key
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEogIBAAKCAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzI
|
||||
w+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoP
|
||||
kcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2
|
||||
hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NO
|
||||
Td0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcW
|
||||
yLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQIBIwKCAQEA4iqWPJXtzZA68mKd
|
||||
ELs4jJsdyky+ewdZeNds5tjcnHU5zUYE25K+ffJED9qUWICcLZDc81TGWjHyAqD1
|
||||
Bw7XpgUwFgeUJwUlzQurAv+/ySnxiwuaGJfhFM1CaQHzfXphgVml+fZUvnJUTvzf
|
||||
TK2Lg6EdbUE9TarUlBf/xPfuEhMSlIE5keb/Zz3/LUlRg8yDqz5w+QWVJ4utnKnK
|
||||
iqwZN0mwpwU7YSyJhlT4YV1F3n4YjLswM5wJs2oqm0jssQu/BT0tyEXNDYBLEF4A
|
||||
sClaWuSJ2kjq7KhrrYXzagqhnSei9ODYFShJu8UWVec3Ihb5ZXlzO6vdNQ1J9Xsf
|
||||
4m+2ywKBgQD6qFxx/Rv9CNN96l/4rb14HKirC2o/orApiHmHDsURs5rUKDx0f9iP
|
||||
cXN7S1uePXuJRK/5hsubaOCx3Owd2u9gD6Oq0CsMkE4CUSiJcYrMANtx54cGH7Rk
|
||||
EjFZxK8xAv1ldELEyxrFqkbE4BKd8QOt414qjvTGyAK+OLD3M2QdCQKBgQDtx8pN
|
||||
CAxR7yhHbIWT1AH66+XWN8bXq7l3RO/ukeaci98JfkbkxURZhtxV/HHuvUhnPLdX
|
||||
3TwygPBYZFNo4pzVEhzWoTtnEtrFueKxyc3+LjZpuo+mBlQ6ORtfgkr9gBVphXZG
|
||||
YEzkCD3lVdl8L4cw9BVpKrJCs1c5taGjDgdInQKBgHm/fVvv96bJxc9x1tffXAcj
|
||||
3OVdUN0UgXNCSaf/3A/phbeBQe9xS+3mpc4r6qvx+iy69mNBeNZ0xOitIjpjBo2+
|
||||
dBEjSBwLk5q5tJqHmy/jKMJL4n9ROlx93XS+njxgibTvU6Fp9w+NOFD/HvxB3Tcz
|
||||
6+jJF85D5BNAG3DBMKBjAoGBAOAxZvgsKN+JuENXsST7F89Tck2iTcQIT8g5rwWC
|
||||
P9Vt74yboe2kDT531w8+egz7nAmRBKNM751U/95P9t88EDacDI/Z2OwnuFQHCPDF
|
||||
llYOUI+SpLJ6/vURRbHSnnn8a/XG+nzedGH5JGqEJNQsz+xT2axM0/W/CRknmGaJ
|
||||
kda/AoGANWrLCz708y7VYgAtW2Uf1DPOIYMdvo6fxIB5i9ZfISgcJ/bbCUkFrhoH
|
||||
+vq/5CIWxCPp0f85R4qxxQ5ihxJ0YDQT9Jpx4TMss4PSavPaBH3RXow5Ohe+bYoQ
|
||||
NE5OgEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=
|
||||
-----END RSA PRIVATE KEY-----
|
0
vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-always/.gitkeep
vendored
Normal file
0
vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-always/.gitkeep
vendored
Normal file
10
vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-always/setup
vendored
Executable file
10
vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-always/setup
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
#! /bin/bash
|
||||
|
||||
# open rabbitmq ports
|
||||
sudo iptables -I INPUT -p tcp --dport 15672 -j ACCEPT
|
||||
|
||||
# open elastic search ports
|
||||
sudo iptables -I INPUT -p tcp --dport 9200 -j ACCEPT
|
||||
|
||||
# open mysql ports
|
||||
sudo iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
|
0
vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-once/.gitkeep
vendored
Normal file
0
vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-once/.gitkeep
vendored
Normal file
111
vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-once/setup
vendored
Normal file
111
vagrant/vms/phraseanet-php54-nginx/puphpet/files/exec-once/setup
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
#!/bin/bash
|
||||
|
||||
# timezone
|
||||
sudo sh -c 'echo "Europe/Paris" > /etc/timezone'
|
||||
sudo dpkg-reconfigure -f noninteractive tzdata
|
||||
|
||||
# locales
|
||||
|
||||
export LANGUAGE=fr_FR.UTF-8
|
||||
export LANG=fr_FR.UTF-8
|
||||
export LC_ALL=fr_FR.UTF-8
|
||||
sudo sh -c 'echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen'
|
||||
sudo sh -c 'echo "de_DE.UTF-8 UTF-8" >> /etc/locale.gen'
|
||||
sudo sh -c 'echo "es_ES.UTF-8 UTF-8" >> /etc/locale.gen'
|
||||
sudo sh -c 'echo "fr_FR.UTF-8 UTF-8" >> /etc/locale.gen'
|
||||
sudo sh -c 'echo "nl_NL.UTF-8 UTF-8" >> /etc/locale.gen'
|
||||
sudo locale-gen en_US en_US.UTF-8 en_GB en_GB.UTF-8 fr_FR fr_FR.UTF-8 de_DE de_DE.UTF-8 nl_NL nl_NL.UTF-8
|
||||
sudo dpkg-reconfigure -f noninteractive locales
|
||||
|
||||
# node + npm
|
||||
cd /tmp
|
||||
wget –quiet "http://nodejs.org/dist/v0.10.29/node-v0.10.29-linux-x64.tar.gz"
|
||||
tar -zxvf node-v0.10.29-linux-x64.tar.gz
|
||||
cd node-v0.10.29-linux-x64
|
||||
find . -maxdepth 1 -type f -exec rm {} \;
|
||||
sudo cp -rf * /usr/local/
|
||||
|
||||
# npm binaries
|
||||
sudo npm install -g recess
|
||||
sudo npm install -g grunt-cli
|
||||
sudo npm install -g bower
|
||||
|
||||
# python tools
|
||||
|
||||
sudo easy_install -U taschenmesser scour boto
|
||||
|
||||
# closure compiler
|
||||
cd /tmp
|
||||
wget –quiet http://dl.google.com/closure-compiler/compiler-latest.zip
|
||||
unzip compiler-latest.zip -d closure
|
||||
mv closure $HOME
|
||||
echo 'export JS_COMPILER=$HOME/closure/compiler.jar' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
# java
|
||||
echo 'export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
#twig
|
||||
cd /tmp
|
||||
git clone https://github.com/fabpot/Twig.git
|
||||
cd Twig/ext/twig
|
||||
phpize
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
sudo sh -c 'echo "extension=twig.so" > /etc/php5/cli/conf.d/twig.ini'
|
||||
sudo sh -c 'echo "extension=twig.so" > /etc/php5/fpm/conf.d/twig.ini'
|
||||
|
||||
# phraseanet-extension
|
||||
cd /tmp
|
||||
git clone git://github.com/alchemy-fr/Phraseanet-Extension.git
|
||||
cd Phraseanet-Extension
|
||||
phpize
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
if [ $? -eq 0 ]; then
|
||||
sudo sh -c 'echo "extension=phrasea2.so" > /etc/php5/cli/conf.d/phrasea.ini'
|
||||
sudo sh -c 'echo "extension=phrasea2.so" > /etc/php5/fpm/conf.d/phrasea.ini'
|
||||
fi
|
||||
|
||||
# phraseanet-indexer
|
||||
cd /tmp
|
||||
git clone git://github.com/alchemy-fr/Phraseanet-Indexer.git
|
||||
cd Phraseanet-Indexer
|
||||
autoreconf --force --install
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
# swftools
|
||||
cd /tmp
|
||||
wget –quiet http://www.swftools.org/swftools-0.9.2.tar.gz
|
||||
tar -xzvf swftools-0.9.2.tar.gz
|
||||
cd swftools-0.9.2
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
# zmq php extension
|
||||
yes | sudo pecl install zmq-beta
|
||||
if [ $? -eq 0 ]; then
|
||||
sudo sh -c 'echo "extension=zmq.so" > /etc/php5/cli/conf.d/zmq.ini'
|
||||
sudo sh -c 'echo "extension=zmq.so" > /etc/php5/fpm/conf.d/zmq.ini'
|
||||
fi
|
||||
|
||||
# libevent php extension
|
||||
sudo apt-get autoremove --yes --purge libevent-dev
|
||||
sudo apt-get install --yes libevent-dev
|
||||
yes | sudo pecl install libevent-beta
|
||||
if [ $? -eq 0 ]; then
|
||||
sudo sh -c 'echo ";extension=libevent.so" > /etc/php5/cli/conf.d/libevent.ini'
|
||||
sudo sh -c 'echo ";extension=libevent.so" > /etc/php5/fpm/conf.d/libevent.ini'
|
||||
fi
|
||||
|
||||
# copy www.conf
|
||||
sudo sh -c "cat /vagrant/vagrant/config/nginx/php5-fpm-www.conf > /etc/php5/fpm/pool.d/www.conf"
|
||||
|
||||
# restart mysql to get new date system
|
||||
sudo service mysql restart
|
0
vagrant/vms/phraseanet-php54-nginx/puphpet/files/startup-always/.gitkeep
vendored
Normal file
0
vagrant/vms/phraseanet-php54-nginx/puphpet/files/startup-always/.gitkeep
vendored
Normal file
0
vagrant/vms/phraseanet-php54-nginx/puphpet/files/startup-once/.gitkeep
vendored
Normal file
0
vagrant/vms/phraseanet-php54-nginx/puphpet/files/startup-once/.gitkeep
vendored
Normal file
27
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/Puppetfile
vendored
Normal file
27
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/Puppetfile
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
forge "http://forge.puppetlabs.com"
|
||||
mod 'stdlib', :git => 'https://github.com/puphpet/puppetlabs-stdlib.git'
|
||||
mod 'concat', :git => 'https://github.com/puphpet/puppetlabs-concat.git'
|
||||
mod 'apt', :git => 'https://github.com/puphpet/puppetlabs-apt.git'
|
||||
mod 'yum', :git => 'https://github.com/puphpet/puppet-yum.git'
|
||||
mod 'vcsrepo', :git => 'https://github.com/puphpet/puppetlabs-vcsrepo.git'
|
||||
mod 'ntp', :git => 'https://github.com/puphpet/puppetlabs-ntp.git'
|
||||
mod 'firewall', :git => 'https://github.com/puppetlabs/puppetlabs-firewall.git'
|
||||
mod 'git', :git => 'https://github.com/puphpet/puppetlabs-git.git'
|
||||
mod 'mailcatcher', :git => 'https://github.com/puphpet/puppet-mailcatcher.git'
|
||||
mod 'supervisord', :git => 'https://github.com/puphpet/puppet-supervisord.git'
|
||||
mod 'apache', :git => 'https://github.com/puphpet/puppetlabs-apache.git'
|
||||
mod 'nginx', :git => 'https://github.com/puphpet/puppet-nginx.git'
|
||||
mod 'php', :git => 'https://github.com/puphpet/puppet-php.git'
|
||||
mod 'composer', :git => 'https://github.com/puphpet/puppet-composer.git'
|
||||
mod 'puphpet', :git => 'https://github.com/puphpet/puppet-puphpet.git'
|
||||
mod 'puppi', :git => 'https://github.com/puphpet/puppi.git'
|
||||
mod 'drush', :git => 'https://github.com/puphpet/puppet-drush.git'
|
||||
mod 'mysql', :git => 'https://github.com/puphpet/puppetlabs-mysql.git'
|
||||
mod 'postgresql', :git => 'https://github.com/puphpet/puppetlabs-postgresql.git'
|
||||
mod 'sqlite', :git => 'https://github.com/puppetlabs/puppetlabs-sqlite.git'
|
||||
mod 'mongodb', :git => 'https://github.com/puphpet/puppetlabs-mongodb.git'
|
||||
mod 'redis', :git => 'https://github.com/puphpet/puppet-redis.git'
|
||||
mod 'beanstalkd', :git => 'https://github.com/puphpet/puppet-beanstalkd.git'
|
||||
mod 'rabbitmq', :git => 'https://github.com/puphpet/puppetlabs-rabbitmq.git'
|
||||
mod 'staging', :git => 'https://github.com/puphpet/puppet-staging.git'
|
||||
mod 'elasticsearch', :git => 'https://github.com/puphpet/puppet-elasticsearch.git'
|
7
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/hiera.yaml
vendored
Normal file
7
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/hiera.yaml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
:backends: yaml
|
||||
:yaml:
|
||||
:datadir: '/vagrant/vagrant/vms/phraseanet-php54-nginx/puphpet'
|
||||
:hierarchy:
|
||||
- config
|
||||
:logger: console
|
1808
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/manifest.pp
vendored
Normal file
1808
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/manifest.pp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/.fixtures.yml
vendored
Normal file
6
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/.fixtures.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
fixtures:
|
||||
repositories:
|
||||
stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
|
||||
concat: "git://github.com/puppetlabs/puppetlabs-concat.git"
|
||||
symlinks:
|
||||
apache: "#{source_dir}"
|
31
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/.nodeset.yml
vendored
Normal file
31
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/.nodeset.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
default_set: 'centos-64-x64'
|
||||
sets:
|
||||
'centos-59-x64':
|
||||
nodes:
|
||||
"main.foo.vm":
|
||||
prefab: 'centos-59-x64'
|
||||
'centos-64-x64':
|
||||
nodes:
|
||||
"main.foo.vm":
|
||||
prefab: 'centos-64-x64'
|
||||
'fedora-18-x64':
|
||||
nodes:
|
||||
"main.foo.vm":
|
||||
prefab: 'fedora-18-x64'
|
||||
'debian-607-x64':
|
||||
nodes:
|
||||
"main.foo.vm":
|
||||
prefab: 'debian-607-x64'
|
||||
'debian-70rc1-x64':
|
||||
nodes:
|
||||
"main.foo.vm":
|
||||
prefab: 'debian-70rc1-x64'
|
||||
'ubuntu-server-10044-x64':
|
||||
nodes:
|
||||
"main.foo.vm":
|
||||
prefab: 'ubuntu-server-10044-x64'
|
||||
'ubuntu-server-12042-x64':
|
||||
nodes:
|
||||
"main.foo.vm":
|
||||
prefab: 'ubuntu-server-12042-x64'
|
5
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/.puppet-lint.rc
vendored
Normal file
5
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/.puppet-lint.rc
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
--no-single_quote_string_with_variables-check
|
||||
--no-80chars-check
|
||||
--no-class_inherits_from_params_class-check
|
||||
--no-class_parameter_defaults-check
|
||||
--no-documentation-check
|
32
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/.travis.yml
vendored
Normal file
32
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/.travis.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
language: ruby
|
||||
bundler_args: --without development
|
||||
script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
|
||||
rvm:
|
||||
- 1.8.7
|
||||
- 1.9.3
|
||||
- 2.0.0
|
||||
env:
|
||||
matrix:
|
||||
- PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
|
||||
- PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
|
||||
- PUPPET_GEM_VERSION="~> 3.0"
|
||||
- PUPPET_GEM_VERSION="~> 3.5.0" STRICT_VARIABLES="yes"
|
||||
matrix:
|
||||
fast_finish: true
|
||||
exclude:
|
||||
- rvm: 1.9.3
|
||||
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
|
||||
- rvm: 1.9.3
|
||||
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
|
||||
- rvm: 2.0.0
|
||||
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
|
||||
- rvm: 2.0.0
|
||||
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
|
||||
- rvm: 1.8.7
|
||||
env: PUPPET_GEM_VERSION="~> 3.2.0"
|
||||
notifications:
|
||||
email: false
|
246
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/CHANGELOG.md
vendored
Normal file
246
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/CHANGELOG.md
vendored
Normal file
@@ -0,0 +1,246 @@
|
||||
## 2014-03-04 Supported Release 1.0.1
|
||||
###Summary
|
||||
|
||||
This is a supported release. This release removes a testing symlink that can
|
||||
cause trouble on systems where /var is on a seperate filesystem from the
|
||||
modulepath.
|
||||
|
||||
####Features
|
||||
####Bugfixes
|
||||
####Known Bugs
|
||||
* By default, the version of Apache that ships with Ubuntu 10.04 does not work with `wsgi_import_script`.
|
||||
* SLES is unsupported.
|
||||
|
||||
## 2014-03-04 Supported Release 1.0.0
|
||||
###Summary
|
||||
|
||||
This is a supported release. This release introduces Apache 2.4 support for
|
||||
Debian and RHEL based osfamilies.
|
||||
|
||||
####Features
|
||||
|
||||
- Add apache24 support
|
||||
- Add rewrite_base functionality to rewrites
|
||||
- Updated README documentation
|
||||
- Add WSGIApplicationGroup and WSGIImportScript directives
|
||||
|
||||
####Bugfixes
|
||||
|
||||
- Replace mutating hashes with merge() for Puppet 3.5
|
||||
- Fix WSGI import_script and mod_ssl issues on Lucid
|
||||
|
||||
####Known Bugs
|
||||
* By default, the version of Apache that ships with Ubuntu 10.04 does not work with `wsgi_import_script`.
|
||||
* SLES is unsupported.
|
||||
|
||||
---
|
||||
|
||||
## 2014-01-31 Release 0.11.0
|
||||
### Summary:
|
||||
|
||||
This release adds preliminary support for Windows compatibility and multiple rewrite support.
|
||||
|
||||
#### Backwards-incompatible Changes:
|
||||
|
||||
- The rewrite_rule parameter is deprecated in favor of the new rewrite parameter
|
||||
and will be removed in a future release.
|
||||
|
||||
#### Features:
|
||||
|
||||
- add Match directive
|
||||
- quote paths for windows compatibility
|
||||
- add auth_group_file option to README.md
|
||||
- allow AuthGroupFile directive for vhosts
|
||||
- Support Header directives in vhost context
|
||||
- Don't purge mods-available dir when separate enable dir is used
|
||||
- Fix the servername used in log file name
|
||||
- Added support for mod_include
|
||||
- Remove index parameters.
|
||||
- Support environment variable control for CustomLog
|
||||
- added redirectmatch support
|
||||
- Setting up the ability to do multiple rewrites and conditions.
|
||||
- Convert spec tests to beaker.
|
||||
- Support php_admin_(flag|value)s
|
||||
|
||||
#### Bugfixes:
|
||||
|
||||
- directories are either a Hash or an Array of Hashes
|
||||
- Configure Passenger in separate .conf file on RH so PassengerRoot isn't lost
|
||||
- (docs) Update list of `apache::mod::[name]` classes
|
||||
- (docs) Fix apache::namevirtualhost example call style
|
||||
- Fix $ports_file reference in apache::listen.
|
||||
- Fix $ports_file reference in Namevirtualhost.
|
||||
|
||||
|
||||
## 2013-12-05 Release 0.10.0
|
||||
### Summary:
|
||||
|
||||
This release adds FreeBSD osfamily support and various other improvements to some mods.
|
||||
|
||||
#### Features:
|
||||
|
||||
- Add suPHP_UserGroup directive to directory context
|
||||
- Add support for ScriptAliasMatch directives
|
||||
- Set SSLOptions StdEnvVars in server context
|
||||
- No implicit <Directory> entry for ScriptAlias path
|
||||
- Add support for overriding ErrorDocument
|
||||
- Add support for AliasMatch directives
|
||||
- Disable default "allow from all" in vhost-directories
|
||||
- Add WSGIPythonPath as an optional parameter to mod_wsgi.
|
||||
- Add mod_rpaf support
|
||||
- Add directives: IndexOptions, IndexOrderDefault
|
||||
- Add ability to include additional external configurations in vhost
|
||||
- need to use the provider variable not the provider key value from the directory hash for matches
|
||||
- Support for FreeBSD and few other features
|
||||
- Add new params to apache::mod::mime class
|
||||
- Allow apache::mod to specify module id and path
|
||||
- added $server_root parameter
|
||||
- Add Allow and ExtendedStatus support to mod_status
|
||||
- Expand vhost/_directories.pp directive support
|
||||
- Add initial support for nss module (no directives in vhost template yet)
|
||||
- added peruser and event mpms
|
||||
- added $service_name parameter
|
||||
- add parameter for TraceEnable
|
||||
- Make LogLevel configurable for server and vhost
|
||||
- Add documentation about $ip
|
||||
- Add ability to pass ip (instead of wildcard) in default vhost files
|
||||
|
||||
#### Bugfixes:
|
||||
|
||||
- Don't listen on port or set NameVirtualHost for non-existent vhost
|
||||
- only apply Directory defaults when provider is a directory
|
||||
- Working mod_authnz_ldap support on Debian/Ubuntu
|
||||
|
||||
## 2013-09-06 Release 0.9.0
|
||||
### Summary:
|
||||
This release adds more parameters to the base apache class and apache defined
|
||||
resource to make the module more flexible. It also adds or enhances SuPHP,
|
||||
WSGI, and Passenger mod support, and support for the ITK mpm module.
|
||||
|
||||
#### Backwards-incompatible Changes:
|
||||
- Remove many default mods that are not normally needed.
|
||||
- Remove `rewrite_base` `apache::vhost` parameter; did not work anyway.
|
||||
- Specify dependencies on stdlib >=2.4.0 (this was already the case, but
|
||||
making explicit)
|
||||
- Deprecate `a2mod` in favor of the `apache::mod::*` classes and `apache::mod`
|
||||
defined resource.
|
||||
|
||||
#### Features:
|
||||
- `apache` class
|
||||
- Add `httpd_dir` parameter to change the location of the configuration
|
||||
files.
|
||||
- Add `logroot` parameter to change the logroot
|
||||
- Add `ports_file` parameter to changes the `ports.conf` file location
|
||||
- Add `keepalive` parameter to enable persistent connections
|
||||
- Add `keepalive_timeout` parameter to change the timeout
|
||||
- Update `default_mods` to be able to take an array of mods to enable.
|
||||
- `apache::vhost`
|
||||
- Add `wsgi_daemon_process`, `wsgi_daemon_process_options`,
|
||||
`wsgi_process_group`, and `wsgi_script_aliases` parameters for per-vhost
|
||||
WSGI configuration.
|
||||
- Add `access_log_syslog` parameter to enable syslogging.
|
||||
- Add `error_log_syslog` parameter to enable syslogging of errors.
|
||||
- Add `directories` hash parameter. Please see README for documentation.
|
||||
- Add `sslproxyengine` parameter to enable SSLProxyEngine
|
||||
- Add `suphp_addhandler`, `suphp_engine`, and `suphp_configpath` for
|
||||
configuring SuPHP.
|
||||
- Add `custom_fragment` parameter to allow for arbitrary apache
|
||||
configuration injection. (Feature pull requests are prefered over using
|
||||
this, but it is available in a pinch.)
|
||||
- Add `apache::mod::suphp` class for configuring SuPHP.
|
||||
- Add `apache::mod::itk` class for configuring ITK mpm module.
|
||||
- Update `apache::mod::wsgi` class for global WSGI configuration with
|
||||
`wsgi_socket_prefix` and `wsgi_python_home` parameters.
|
||||
- Add README.passenger.md to document the `apache::mod::passenger` usage.
|
||||
Added `passenger_high_performance`, `passenger_pool_idle_time`,
|
||||
`passenger_max_requests`, `passenger_stat_throttle_rate`, `rack_autodetect`,
|
||||
and `rails_autodetect` parameters.
|
||||
- Separate the httpd service resource into a new `apache::service` class for
|
||||
dependency chaining of `Class['apache'] -> <resource> ~>
|
||||
Class['apache::service']`
|
||||
- Added `apache::mod::proxy_balancer` class for `apache::balancer`
|
||||
|
||||
#### Bugfixes:
|
||||
- Change dependency to puppetlabs-concat
|
||||
- Fix ruby 1.9 bug for `a2mod`
|
||||
- Change servername to be `$::hostname` if there is no `$::fqdn`
|
||||
- Make `/etc/ssl/certs` the default ssl certs directory for RedHat non-5.
|
||||
- Make `php` the default php package for RedHat non-5.
|
||||
- Made `aliases` able to take a single alias hash instead of requiring an
|
||||
array.
|
||||
|
||||
## 2013-07-26 Release 0.8.1
|
||||
#### Bugfixes:
|
||||
- Update `apache::mpm_module` detection for worker/prefork
|
||||
- Update `apache::mod::cgi` and `apache::mod::cgid` detection for
|
||||
worker/prefork
|
||||
|
||||
## 2013-07-16 Release 0.8.0
|
||||
#### Features:
|
||||
- Add `servername` parameter to `apache` class
|
||||
- Add `proxy_set` parameter to `apache::balancer` define
|
||||
|
||||
#### Bugfixes:
|
||||
- Fix ordering for multiple `apache::balancer` clusters
|
||||
- Fix symlinking for sites-available on Debian-based OSs
|
||||
- Fix dependency ordering for recursive confdir management
|
||||
- Fix `apache::mod::*` to notify the service on config change
|
||||
- Documentation updates
|
||||
|
||||
## 2013-07-09 Release 0.7.0
|
||||
#### Changes:
|
||||
- Essentially rewrite the module -- too many to list
|
||||
- `apache::vhost` has many abilities -- see README.md for details
|
||||
- `apache::mod::*` classes provide httpd mod-loading capabilities
|
||||
- `apache` base class is much more configurable
|
||||
|
||||
#### Bugfixes:
|
||||
- Many. And many more to come
|
||||
|
||||
## 2013-03-2 Release 0.6.0
|
||||
- update travis tests (add more supported versions)
|
||||
- add access log_parameter
|
||||
- make purging of vhost dir configurable
|
||||
|
||||
## 2012-08-24 Release 0.4.0
|
||||
#### Changes:
|
||||
- `include apache` is now required when using `apache::mod::*`
|
||||
|
||||
#### Bugfixes:
|
||||
- Fix syntax for validate_re
|
||||
- Fix formatting in vhost template
|
||||
- Fix spec tests such that they pass
|
||||
|
||||
##2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4
|
||||
* e62e362 Fix broken tests for ssl, vhost, vhost::*
|
||||
* 42c6363 Changes to match style guide and pass puppet-lint without error
|
||||
* 42bc8ba changed name => path for file resources in order to name namevar by it's name
|
||||
* 72e13de One end too much
|
||||
* 0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.
|
||||
* 273f94d fix tests
|
||||
* a35ede5 (#13860) Make a2enmod/a2dismo commands optional
|
||||
* 98d774e (#13860) Autorequire Package['httpd']
|
||||
* 05fcec5 (#13073) Add missing puppet spec tests
|
||||
* 541afda (#6899) Remove virtual a2mod definition
|
||||
* 976cb69 (#13072) Move mod python and wsgi package names to params
|
||||
* 323915a (#13060) Add .gitignore to repo
|
||||
* fdf40af (#13060) Remove pkg directory from source tree
|
||||
* fd90015 Add LICENSE file and update the ModuleFile
|
||||
* d3d0d23 Re-enable local php class
|
||||
* d7516c7 Make management of firewalls configurable for vhosts
|
||||
* 60f83ba Explicitly lookup scope of apache_name in templates.
|
||||
* f4d287f (#12581) Add explicit ordering for vdir directory
|
||||
* 88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall
|
||||
* a776a8b (#11071) Fix to work with latest firewall module
|
||||
* 2b79e8b (#11070) Add support for Scientific Linux
|
||||
* 405b3e9 Fix for a2mod
|
||||
* 57b9048 Commit apache::vhost::redirect Manifest
|
||||
* 8862d01 Commit apache::vhost::proxy Manifest
|
||||
* d5c1fd0 Commit apache::mod::wsgi Manifest
|
||||
* a825ac7 Commit apache::mod::python Manifest
|
||||
* b77062f Commit Templates
|
||||
* 9a51b4a Vhost File Declarations
|
||||
* 6cf7312 Defaults for Parameters
|
||||
* 6a5b11a Ensure installed
|
||||
* f672e46 a2mod fix
|
||||
* 8a56ee9 add pthon support to apache
|
234
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/CONTRIBUTING.md
vendored
Normal file
234
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,234 @@
|
||||
Checklist (and a short version for the impatient)
|
||||
=================================================
|
||||
|
||||
* Commits:
|
||||
|
||||
- Make commits of logical units.
|
||||
|
||||
- Check for unnecessary whitespace with "git diff --check" before
|
||||
committing.
|
||||
|
||||
- Commit using Unix line endings (check the settings around "crlf" in
|
||||
git-config(1)).
|
||||
|
||||
- Do not check in commented out code or unneeded files.
|
||||
|
||||
- The first line of the commit message should be a short
|
||||
description (50 characters is the soft limit, excluding ticket
|
||||
number(s)), and should skip the full stop.
|
||||
|
||||
- Associate the issue in the message. The first line should include
|
||||
the issue number in the form "(#XXXX) Rest of message".
|
||||
|
||||
- The body should provide a meaningful commit message, which:
|
||||
|
||||
- uses the imperative, present tense: "change", not "changed" or
|
||||
"changes".
|
||||
|
||||
- includes motivation for the change, and contrasts its
|
||||
implementation with the previous behavior.
|
||||
|
||||
- Make sure that you have tests for the bug you are fixing, or
|
||||
feature you are adding.
|
||||
|
||||
- Make sure the test suites passes after your commit:
|
||||
`bundle exec rspec spec/acceptance` More information on [testing](#Testing) below
|
||||
|
||||
- When introducing a new feature, make sure it is properly
|
||||
documented in the README.md
|
||||
|
||||
* Submission:
|
||||
|
||||
* Pre-requisites:
|
||||
|
||||
- Sign the [Contributor License Agreement](https://cla.puppetlabs.com/)
|
||||
|
||||
- Make sure you have a [GitHub account](https://github.com/join)
|
||||
|
||||
- [Create a ticket](http://projects.puppetlabs.com/projects/modules/issues/new), or [watch the ticket](http://projects.puppetlabs.com/projects/modules/issues) you are patching for.
|
||||
|
||||
* Preferred method:
|
||||
|
||||
- Fork the repository on GitHub.
|
||||
|
||||
- Push your changes to a topic branch in your fork of the
|
||||
repository. (the format ticket/1234-short_description_of_change is
|
||||
usually preferred for this project).
|
||||
|
||||
- Submit a pull request to the repository in the puppetlabs
|
||||
organization.
|
||||
|
||||
The long version
|
||||
================
|
||||
|
||||
1. Make separate commits for logically separate changes.
|
||||
|
||||
Please break your commits down into logically consistent units
|
||||
which include new or changed tests relevant to the rest of the
|
||||
change. The goal of doing this is to make the diff easier to
|
||||
read for whoever is reviewing your code. In general, the easier
|
||||
your diff is to read, the more likely someone will be happy to
|
||||
review it and get it into the code base.
|
||||
|
||||
If you are going to refactor a piece of code, please do so as a
|
||||
separate commit from your feature or bug fix changes.
|
||||
|
||||
We also really appreciate changes that include tests to make
|
||||
sure the bug is not re-introduced, and that the feature is not
|
||||
accidentally broken.
|
||||
|
||||
Describe the technical detail of the change(s). If your
|
||||
description starts to get too long, that is a good sign that you
|
||||
probably need to split up your commit into more finely grained
|
||||
pieces.
|
||||
|
||||
Commits which plainly describe the things which help
|
||||
reviewers check the patch and future developers understand the
|
||||
code are much more likely to be merged in with a minimum of
|
||||
bike-shedding or requested changes. Ideally, the commit message
|
||||
would include information, and be in a form suitable for
|
||||
inclusion in the release notes for the version of Puppet that
|
||||
includes them.
|
||||
|
||||
Please also check that you are not introducing any trailing
|
||||
whitespace or other "whitespace errors". You can do this by
|
||||
running "git diff --check" on your changes before you commit.
|
||||
|
||||
2. Sign the Contributor License Agreement
|
||||
|
||||
Before we can accept your changes, we do need a signed Puppet
|
||||
Labs Contributor License Agreement (CLA).
|
||||
|
||||
You can access the CLA via the [Contributor License Agreement link](https://cla.puppetlabs.com/)
|
||||
|
||||
If you have any questions about the CLA, please feel free to
|
||||
contact Puppet Labs via email at cla-submissions@puppetlabs.com.
|
||||
|
||||
3. Sending your patches
|
||||
|
||||
To submit your changes via a GitHub pull request, we _highly_
|
||||
recommend that you have them on a topic branch, instead of
|
||||
directly on "master".
|
||||
It makes things much easier to keep track of, especially if
|
||||
you decide to work on another thing before your first change
|
||||
is merged in.
|
||||
|
||||
GitHub has some pretty good
|
||||
[general documentation](http://help.github.com/) on using
|
||||
their site. They also have documentation on
|
||||
[creating pull requests](http://help.github.com/send-pull-requests/).
|
||||
|
||||
In general, after pushing your topic branch up to your
|
||||
repository on GitHub, you can switch to the branch in the
|
||||
GitHub UI and click "Pull Request" towards the top of the page
|
||||
in order to open a pull request.
|
||||
|
||||
|
||||
4. Update the related GitHub issue.
|
||||
|
||||
If there is a GitHub issue associated with the change you
|
||||
submitted, then you should update the ticket to include the
|
||||
location of your branch, along with any other commentary you
|
||||
may wish to make.
|
||||
|
||||
Testing
|
||||
=======
|
||||
|
||||
Getting Started
|
||||
---------------
|
||||
|
||||
Our puppet modules provide [`Gemfile`](./Gemfile)s which can tell a ruby
|
||||
package manager such as [bundler](http://bundler.io/) what Ruby packages,
|
||||
or Gems, are required to build, develop, and test this software.
|
||||
|
||||
Please make sure you have [bundler installed](http://bundler.io/#getting-started)
|
||||
on your system, then use it to install all dependencies needed for this project,
|
||||
by running
|
||||
|
||||
```shell
|
||||
% bundle install
|
||||
Fetching gem metadata from https://rubygems.org/........
|
||||
Fetching gem metadata from https://rubygems.org/..
|
||||
Using rake (10.1.0)
|
||||
Using builder (3.2.2)
|
||||
-- 8><-- many more --><8 --
|
||||
Using rspec-system-puppet (2.2.0)
|
||||
Using serverspec (0.6.3)
|
||||
Using rspec-system-serverspec (1.0.0)
|
||||
Using bundler (1.3.5)
|
||||
Your bundle is complete!
|
||||
Use `bundle show [gemname]` to see where a bundled gem is installed.
|
||||
```
|
||||
|
||||
NOTE some systems may require you to run this command with sudo.
|
||||
|
||||
If you already have those gems installed, make sure they are up-to-date:
|
||||
|
||||
```shell
|
||||
% bundle update
|
||||
```
|
||||
|
||||
With all dependencies in place and up-to-date we can now run the tests:
|
||||
|
||||
```shell
|
||||
% rake spec
|
||||
```
|
||||
|
||||
This will execute all the [rspec tests](http://rspec-puppet.com/) tests
|
||||
under [spec/defines](./spec/defines), [spec/classes](./spec/classes),
|
||||
and so on. rspec tests may have the same kind of dependencies as the
|
||||
module they are testing. While the module defines in its [Modulefile](./Modulefile),
|
||||
rspec tests define them in [.fixtures.yml](./fixtures.yml).
|
||||
|
||||
Some puppet modules also come with [beaker](https://github.com/puppetlabs/beaker)
|
||||
tests. These tests spin up a virtual machine under
|
||||
[VirtualBox](https://www.virtualbox.org/)) with, controlling it with
|
||||
[Vagrant](http://www.vagrantup.com/) to actually simulate scripted test
|
||||
scenarios. In order to run these, you will need both of those tools
|
||||
installed on your system.
|
||||
|
||||
You can run them by issuing the following command
|
||||
|
||||
```shell
|
||||
% rake spec_clean
|
||||
% rspec spec/acceptance
|
||||
```
|
||||
|
||||
This will now download a pre-fabricated image configured in the [default node-set](./spec/acceptance/nodesets/default.yml),
|
||||
install puppet, copy this module and install its dependencies per [spec/spec_helper_acceptance.rb](./spec/spec_helper_acceptance.rb)
|
||||
and then run all the tests under [spec/acceptance](./spec/acceptance).
|
||||
|
||||
Writing Tests
|
||||
-------------
|
||||
|
||||
XXX getting started writing tests.
|
||||
|
||||
If you have commit access to the repository
|
||||
===========================================
|
||||
|
||||
Even if you have commit access to the repository, you will still need to
|
||||
go through the process above, and have someone else review and merge
|
||||
in your changes. The rule is that all changes must be reviewed by a
|
||||
developer on the project (that did not write the code) to ensure that
|
||||
all changes go through a code review process.
|
||||
|
||||
Having someone other than the author of the topic branch recorded as
|
||||
performing the merge is the record that they performed the code
|
||||
review.
|
||||
|
||||
|
||||
Additional Resources
|
||||
====================
|
||||
|
||||
* [Getting additional help](http://projects.puppetlabs.com/projects/puppet/wiki/Getting_Help)
|
||||
|
||||
* [Writing tests](http://projects.puppetlabs.com/projects/puppet/wiki/Development_Writing_Tests)
|
||||
|
||||
* [Patchwork](https://patchwork.puppetlabs.com)
|
||||
|
||||
* [Contributor License Agreement](https://projects.puppetlabs.com/contributor_licenses/sign)
|
||||
|
||||
* [General GitHub documentation](http://help.github.com/)
|
||||
|
||||
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
|
||||
|
26
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/Gemfile
vendored
Normal file
26
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/Gemfile
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
||||
|
||||
group :development, :test do
|
||||
gem 'rake', '10.1.1', :require => false
|
||||
gem 'rspec-puppet', '>=1.0.0', :require => false
|
||||
gem 'puppetlabs_spec_helper', :require => false
|
||||
gem 'serverspec', :require => false
|
||||
gem 'puppet-lint', :require => false
|
||||
gem 'beaker', :require => false
|
||||
gem 'beaker-rspec', :require => false
|
||||
gem 'rspec', '~> 2.11', :require => false
|
||||
end
|
||||
|
||||
if facterversion = ENV['FACTER_GEM_VERSION']
|
||||
gem 'facter', facterversion, :require => false
|
||||
else
|
||||
gem 'facter', :require => false
|
||||
end
|
||||
|
||||
if puppetversion = ENV['PUPPET_GEM_VERSION']
|
||||
gem 'puppet', puppetversion, :require => false
|
||||
else
|
||||
gem 'puppet', :require => false
|
||||
end
|
||||
|
||||
# vim:ft=ruby
|
15
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/LICENSE
vendored
Normal file
15
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/LICENSE
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
Copyright (C) 2012 Puppet Labs Inc
|
||||
|
||||
Puppet Labs can be contacted at: info@puppetlabs.com
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
12
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/Modulefile
vendored
Normal file
12
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/Modulefile
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
name 'puppetlabs-apache'
|
||||
version '1.0.1'
|
||||
source 'git://github.com/puppetlabs/puppetlabs-apache.git'
|
||||
author 'puppetlabs'
|
||||
license 'Apache 2.0'
|
||||
summary 'Puppet module for Apache'
|
||||
description 'Module for Apache configuration'
|
||||
project_page 'https://github.com/puppetlabs/puppetlabs-apache'
|
||||
|
||||
## Add dependencies, if any:
|
||||
dependency 'puppetlabs/stdlib', '>= 2.4.0'
|
||||
dependency 'puppetlabs/concat', '>= 1.0.0'
|
1958
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/README.md
vendored
Normal file
1958
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/README.md
vendored
Normal file
File diff suppressed because it is too large
Load Diff
278
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/README.passenger.md
vendored
Normal file
278
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/README.passenger.md
vendored
Normal file
@@ -0,0 +1,278 @@
|
||||
# Passenger
|
||||
|
||||
Just enabling the Passenger module is insufficient for the use of Passenger in
|
||||
production. Passenger should be tunable to better fit the environment in which
|
||||
it is run while being aware of the resources it required.
|
||||
|
||||
To this end the Apache passenger module has been modified to apply system wide
|
||||
Passenger tuning declarations to `passenger.conf`. Declarations specific to a
|
||||
virtual host should be passed through when defining a `vhost` (e.g.
|
||||
`rack_base_uris` parameter on the `apache::vhost` type, check `README.md`).
|
||||
|
||||
Also, general apache module loading parameters can be supplied to enable using
|
||||
a customized passenger module in place of a default-package-based version of
|
||||
the module.
|
||||
|
||||
# Operating system support and Passenger versions
|
||||
|
||||
The most important configuration directive for the Apache Passenger module is
|
||||
`PassengerRoot`. Its value depends on the Passenger version used (2.x, 3.x or
|
||||
4.x) and on the operating system package from which the Apache Passenger module
|
||||
is installed.
|
||||
|
||||
The following table summarises the current *default versions* and
|
||||
`PassengerRoot` settings for the operating systems supported by
|
||||
puppetlabs-apache:
|
||||
|
||||
OS | Passenger version | `PassengerRoot`
|
||||
---------------- | ------------------ | ----------------
|
||||
Debian 7 | 3.0.13 | /usr
|
||||
Ubuntu 12.04 | 2.2.11 | /usr
|
||||
Ubuntu 14.04 | 4.0.37 | /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
|
||||
RHEL with EPEL6 | 3.0.21 | /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21
|
||||
|
||||
As mentioned in `README.md` there are no compatible packages available for
|
||||
RHEL/CentOS 5 or RHEL/CentOS 7.
|
||||
|
||||
## Configuration files and locations on RHEL/CentOS
|
||||
|
||||
Notice two important points:
|
||||
|
||||
1. The Passenger version packaged in the EPEL repositories may change over time.
|
||||
2. The value of `PassengerRoot` depends on the Passenger version installed.
|
||||
|
||||
To prevent the puppetlabs-apache module from having to keep up with these
|
||||
package versions the Passenger configuration files installed by the
|
||||
packages are left untouched by this module. All configuration is placed in an
|
||||
extra configuration file managed by puppetlabs-apache.
|
||||
|
||||
This means '/etc/httpd/conf.d/passenger.conf' is installed by the
|
||||
`mod_passenger` package and contains correct values for `PassengerRoot` and
|
||||
`PassengerRuby`. Puppet will ignore this file. Additional configuration
|
||||
directives as described in the remainder of this document are placed in
|
||||
'/etc/httpd/conf.d/passenger_extra.conf', managed by Puppet.
|
||||
|
||||
This pertains *only* to RHEL/CentOS, *not* Debian and Ubuntu.
|
||||
|
||||
## Third-party and custom Passenger packages and versions
|
||||
|
||||
The Passenger version distributed by the default OS packages may be too old to
|
||||
be useful. Newer versions may be installed via Gems, from source or from
|
||||
third-party OS packages.
|
||||
|
||||
Most notably the Passenger developers officially provide Debian packages for a
|
||||
variety of Debian and Ubuntu releases in the [Passenger APT
|
||||
repository](https://oss-binaries.phusionpassenger.com/apt/passenger). Read more
|
||||
about [installing these packages in the offical user
|
||||
guide](http://www.modrails.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu).
|
||||
|
||||
If you install custom Passenger packages and newer version make sure to set the
|
||||
directives `PassengerRoot`, `PassengerRuby` and/or `PassengerDefaultRuby`
|
||||
correctly, or Passenger and Apache will fail to function properly.
|
||||
|
||||
For Passenger 4.x packages on Debian and Ubuntu the `PassengerRoot` directive
|
||||
should almost universally be set to
|
||||
`/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini`.
|
||||
|
||||
# Parameters for `apache::mod::passenger`
|
||||
|
||||
The following class parameters configure Passenger in a global, server-wide
|
||||
context.
|
||||
|
||||
Example:
|
||||
|
||||
```puppet
|
||||
class { 'apache::mod::passenger':
|
||||
passenger_root => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini',
|
||||
passenger_default_ruby => '/usr/bin/ruby1.9.3',
|
||||
passenger_high_performance => 'on',
|
||||
rails_autodetect => 'off',
|
||||
mod_lib_path => '/usr/lib/apache2/custom_modules',
|
||||
}
|
||||
```
|
||||
|
||||
The general form is using the all lower-case version of the configuration
|
||||
directive, with underscores instead of CamelCase.
|
||||
|
||||
## Parameters used with passenger.conf
|
||||
|
||||
If you pass a default value to `apache::mod::passenger` it will be ignored and
|
||||
not passed through to the configuration file.
|
||||
|
||||
### passenger_root
|
||||
|
||||
The location to the Phusion Passenger root directory. This configuration option
|
||||
is essential to Phusion Passenger, and allows Phusion Passenger to locate its
|
||||
own data files.
|
||||
|
||||
The default depends on the Passenger version and the means of installation. See
|
||||
the above section on operating system support, versions and packages for more
|
||||
information.
|
||||
|
||||
http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerroot_lt_directory_gt
|
||||
|
||||
### passenger_default_ruby
|
||||
|
||||
This option specifies the default Ruby interpreter to use for web apps as well
|
||||
as for all sorts of internal Phusion Passenger helper scripts, e.g. the one
|
||||
used by PassengerPreStart.
|
||||
|
||||
This directive was introduced in Passenger 4.0.0 and will not work in versions
|
||||
< 4.x. Do not set this parameter if your Passenger version is older than 4.0.0.
|
||||
|
||||
Defaults to `undef` for all operating systems except Ubuntu 14.04, where it is
|
||||
set to '/usr/bin/ruby'.
|
||||
|
||||
http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerDefaultRuby
|
||||
|
||||
### passenger_ruby
|
||||
|
||||
This directive is the same as `passenger_default_ruby` for Passenger versions
|
||||
< 4.x and must be used instead of `passenger_default_ruby` for such versions.
|
||||
|
||||
It makes no sense to set `PassengerRuby` for Passenger >= 4.x. That
|
||||
directive should only be used to override the value of `PassengerDefaultRuby`
|
||||
on a non-global context, i.e. in `<VirtualHost>`, `<Directory>`, `<Location>`
|
||||
and so on.
|
||||
|
||||
Defaults to `/usr/bin/ruby` for all supported operating systems except Ubuntu
|
||||
14.04, where it is set to `undef`.
|
||||
|
||||
http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby
|
||||
|
||||
### passenger_high_performance
|
||||
|
||||
Default is `off`. When turned `on` Passenger runs in a higher performance mode
|
||||
that can be less compatible with other Apache modules.
|
||||
|
||||
http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerHighPerformance
|
||||
|
||||
### passenger_max_pool_size
|
||||
|
||||
Sets the maximum number of Passenger application processes that may
|
||||
simultaneously run. The default value is 6.
|
||||
|
||||
http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengermaxpoolsize_lt_integer_gt
|
||||
|
||||
### passenger_pool_idle_time
|
||||
|
||||
The maximum number of seconds a Passenger Application process will be allowed
|
||||
to remain idle before being shut down. The default value is 300.
|
||||
|
||||
http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerPoolIdleTime
|
||||
|
||||
### passenger_max_requests
|
||||
|
||||
The maximum number of request a Passenger application will process before being
|
||||
restarted. The default value is 0, which indicates that a process will only
|
||||
shut down if the Pool Idle Time (see above) expires.
|
||||
|
||||
http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerMaxRequests
|
||||
|
||||
### passenger_stat_throttle_rate
|
||||
|
||||
Sets how often Passenger performs file system checks, at most once every _x_
|
||||
seconds. Default is 0, which means the checks are performed with every request.
|
||||
|
||||
http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerstatthrottlerate_lt_integer_gt
|
||||
|
||||
### rack_autodetect
|
||||
|
||||
Should Passenger automatically detect if the document root of a virtual host is
|
||||
a Rack application. Not set by default (`undef`). Note that this directive has
|
||||
been removed in Passenger 4.0.0 and `PassengerEnabled` should be used instead.
|
||||
Use this directive only on Passenger < 4.x.
|
||||
|
||||
http://www.modrails.com/documentation/Users%20guide%20Apache.html#_rackautodetect_lt_on_off_gt
|
||||
|
||||
### rails_autodetect
|
||||
|
||||
Should Passenger automatically detect if the document root of a virtual host is
|
||||
a Rails application. Not set by default (`undef`). Note that this directive
|
||||
has been removed in Passenger 4.0.0 and `PassengerEnabled` should be used
|
||||
instead. Use this directive only on Passenger < 4.x.
|
||||
|
||||
http://www.modrails.com/documentation/Users%20guide%20Apache.html#_railsautodetect_lt_on_off_gt
|
||||
|
||||
### passenger_use_global_queue
|
||||
|
||||
Allows toggling of PassengerUseGlobalQueue. NOTE: PassengerUseGlobalQueue is
|
||||
the default in Passenger 4.x and the versions >= 4.x have disabled this
|
||||
configuration option altogether. Use with caution.
|
||||
|
||||
## Parameters used to load the module
|
||||
|
||||
Unlike the tuning parameters specified above, the following parameters are only
|
||||
used when loading customized passenger modules.
|
||||
|
||||
### mod_package
|
||||
|
||||
Allows overriding the default package name used for the passenger module
|
||||
package.
|
||||
|
||||
### mod_package_ensure
|
||||
|
||||
Allows overriding the package installation setting used by puppet when
|
||||
installing the passenger module. The default is 'present'.
|
||||
|
||||
### mod_id
|
||||
|
||||
Allows overriding the value used by apache to identify the passenger module.
|
||||
The default is 'passenger_module'.
|
||||
|
||||
### mod_lib_path
|
||||
|
||||
Allows overriding the directory path used by apache when loading the passenger
|
||||
module. The default is the value of `$apache::params::lib_path`.
|
||||
|
||||
### mod_lib
|
||||
|
||||
Allows overriding the library file name used by apache when loading the
|
||||
passenger module. The default is 'mod_passenger.so'.
|
||||
|
||||
### mod_path
|
||||
|
||||
Allows overriding the full path to the library file used by apache when loading
|
||||
the passenger module. The default is the concatenation of the `mod_lib_path`
|
||||
and `mod_lib` parameters.
|
||||
|
||||
# Dependencies
|
||||
|
||||
RedHat-based systems will need to configure additional package repositories in
|
||||
order to install Passenger, specifically:
|
||||
|
||||
* [Extra Packages for Enterprise Linux](https://fedoraproject.org/wiki/EPEL)
|
||||
* [Phusion Passenger](http://passenger.stealthymonkeys.com)
|
||||
|
||||
Configuration of these repositories is beyond the scope of this module and is
|
||||
left to the user.
|
||||
|
||||
# Attribution
|
||||
|
||||
The Passenger tuning parameters for the `apache::mod::passenger` Puppet class
|
||||
was modified by Aaron Hicks (hicksa@landcareresearch.co.nz) for work on the
|
||||
NeSI Project and the Tuakiri New Zealand Access Federation as a fork from the
|
||||
PuppetLabs Apache module on GitHub.
|
||||
|
||||
* https://github.com/puppetlabs/puppetlabs-apache
|
||||
* https://github.com/nesi/puppetlabs-apache
|
||||
* http://www.nesi.org.nz//
|
||||
* https://tuakiri.ac.nz/confluence/display/Tuakiri/Home
|
||||
|
||||
# Copyright and License
|
||||
|
||||
Copyright (C) 2012 [Puppet Labs](https://www.puppetlabs.com/) Inc
|
||||
|
||||
Puppet Labs can be contacted at: info@puppetlabs.com
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
10
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/Rakefile
vendored
Normal file
10
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/Rakefile
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
require 'puppetlabs_spec_helper/rake_tasks'
|
||||
require 'puppet-lint/tasks/puppet-lint'
|
||||
|
||||
PuppetLint.configuration.fail_on_warnings
|
||||
PuppetLint.configuration.send('disable_80chars')
|
||||
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
|
||||
PuppetLint.configuration.send('disable_class_parameter_defaults')
|
||||
PuppetLint.configuration.send('disable_documentation')
|
||||
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
|
||||
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
|
24
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/files/httpd
vendored
Normal file
24
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/files/httpd
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# Configuration file for the httpd service.
|
||||
|
||||
#
|
||||
# The default processing model (MPM) is the process-based
|
||||
# 'prefork' model. A thread-based model, 'worker', is also
|
||||
# available, but does not work with some modules (such as PHP).
|
||||
# The service must be stopped before changing this variable.
|
||||
#
|
||||
#HTTPD=/usr/sbin/httpd.worker
|
||||
|
||||
#
|
||||
# To pass additional options (for instance, -D definitions) to the
|
||||
# httpd binary at startup, set OPTIONS here.
|
||||
#
|
||||
#OPTIONS=
|
||||
#OPTIONS=-DDOWN
|
||||
|
||||
#
|
||||
# By default, the httpd process is started in the C locale; to
|
||||
# change the locale in which the server runs, the HTTPD_LANG
|
||||
# variable can be set.
|
||||
#
|
||||
#HTTPD_LANG=C
|
||||
export SHORTHOST=`hostname -s`
|
34
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb
vendored
Normal file
34
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
class Puppet::Provider::A2mod < Puppet::Provider
|
||||
def self.prefetch(mods)
|
||||
instances.each do |prov|
|
||||
if mod = mods[prov.name]
|
||||
mod.provider = prov
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def flush
|
||||
@property_hash.clear
|
||||
end
|
||||
|
||||
def properties
|
||||
if @property_hash.empty?
|
||||
@property_hash = query || {:ensure => :absent}
|
||||
@property_hash[:ensure] = :absent if @property_hash.empty?
|
||||
end
|
||||
@property_hash.dup
|
||||
end
|
||||
|
||||
def query
|
||||
self.class.instances.each do |mod|
|
||||
if mod.name == self.name or mod.name.downcase == self.name
|
||||
return mod.properties
|
||||
end
|
||||
end
|
||||
nil
|
||||
end
|
||||
|
||||
def exists?
|
||||
properties[:ensure] != :absent
|
||||
end
|
||||
end
|
@@ -0,0 +1,35 @@
|
||||
require 'puppet/provider/a2mod'
|
||||
|
||||
Puppet::Type.type(:a2mod).provide(:a2mod, :parent => Puppet::Provider::A2mod) do
|
||||
desc "Manage Apache 2 modules on Debian and Ubuntu"
|
||||
|
||||
optional_commands :encmd => "a2enmod"
|
||||
optional_commands :discmd => "a2dismod"
|
||||
commands :apache2ctl => "apache2ctl"
|
||||
|
||||
confine :osfamily => :debian
|
||||
defaultfor :operatingsystem => [:debian, :ubuntu]
|
||||
|
||||
def self.instances
|
||||
modules = apache2ctl("-M").lines.collect { |line|
|
||||
m = line.match(/(\w+)_module \(shared\)$/)
|
||||
m[1] if m
|
||||
}.compact
|
||||
|
||||
modules.map do |mod|
|
||||
new(
|
||||
:name => mod,
|
||||
:ensure => :present,
|
||||
:provider => :a2mod
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
encmd resource[:name]
|
||||
end
|
||||
|
||||
def destroy
|
||||
discmd resource[:name]
|
||||
end
|
||||
end
|
116
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb
vendored
Normal file
116
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
require 'puppet/util/filetype'
|
||||
Puppet::Type.type(:a2mod).provide(:gentoo, :parent => Puppet::Provider) do
|
||||
desc "Manage Apache 2 modules on Gentoo"
|
||||
|
||||
confine :operatingsystem => :gentoo
|
||||
defaultfor :operatingsystem => :gentoo
|
||||
|
||||
attr_accessor :property_hash
|
||||
|
||||
def create
|
||||
@property_hash[:ensure] = :present
|
||||
end
|
||||
|
||||
def exists?
|
||||
(!(@property_hash[:ensure].nil?) and @property_hash[:ensure] == :present)
|
||||
end
|
||||
|
||||
def destroy
|
||||
@property_hash[:ensure] = :absent
|
||||
end
|
||||
|
||||
def flush
|
||||
self.class.flush
|
||||
end
|
||||
|
||||
class << self
|
||||
attr_reader :conf_file
|
||||
end
|
||||
|
||||
def self.clear
|
||||
@mod_resources = []
|
||||
@modules = []
|
||||
@other_args = ""
|
||||
end
|
||||
|
||||
def self.initvars
|
||||
@conf_file = "/etc/conf.d/apache2"
|
||||
@filetype = Puppet::Util::FileType.filetype(:flat).new(conf_file)
|
||||
@mod_resources = []
|
||||
@modules = []
|
||||
@other_args = ""
|
||||
end
|
||||
|
||||
self.initvars
|
||||
|
||||
# Retrieve an array of all existing modules
|
||||
def self.modules
|
||||
if @modules.length <= 0
|
||||
# Locate the APACHE_OPTS variable
|
||||
records = filetype.read.split(/\n/)
|
||||
apache2_opts = records.grep(/^\s*APACHE2_OPTS=/).first
|
||||
|
||||
# Extract all defines
|
||||
while apache2_opts.sub!(/-D\s+(\w+)/, '')
|
||||
@modules << $1.downcase
|
||||
end
|
||||
|
||||
# Hang on to any remaining options.
|
||||
if apache2_opts.match(/APACHE2_OPTS="(.+)"/)
|
||||
@other_args = $1.strip
|
||||
end
|
||||
|
||||
@modules.sort!.uniq!
|
||||
end
|
||||
|
||||
@modules
|
||||
end
|
||||
|
||||
def self.prefetch(resources={})
|
||||
# Match resources with existing providers
|
||||
instances.each do |provider|
|
||||
if resource = resources[provider.name]
|
||||
resource.provider = provider
|
||||
end
|
||||
end
|
||||
|
||||
# Store all resources using this provider for flushing
|
||||
resources.each do |name, resource|
|
||||
@mod_resources << resource
|
||||
end
|
||||
end
|
||||
|
||||
def self.instances
|
||||
modules.map {|mod| new(:name => mod, :provider => :gentoo, :ensure => :present)}
|
||||
end
|
||||
|
||||
def self.flush
|
||||
|
||||
mod_list = modules
|
||||
mods_to_remove = @mod_resources.select {|mod| mod.should(:ensure) == :absent}.map {|mod| mod[:name]}
|
||||
mods_to_add = @mod_resources.select {|mod| mod.should(:ensure) == :present}.map {|mod| mod[:name]}
|
||||
|
||||
mod_list -= mods_to_remove
|
||||
mod_list += mods_to_add
|
||||
mod_list.sort!.uniq!
|
||||
|
||||
if modules != mod_list
|
||||
opts = @other_args + " "
|
||||
opts << mod_list.map {|mod| "-D #{mod.upcase}"}.join(" ")
|
||||
opts.strip!
|
||||
opts.gsub!(/\s+/, ' ')
|
||||
|
||||
apache2_opts = %Q{APACHE2_OPTS="#{opts}"}
|
||||
Puppet.debug("Writing back \"#{apache2_opts}\" to #{conf_file}")
|
||||
|
||||
records = filetype.read.split(/\n/)
|
||||
|
||||
opts_index = records.find_index {|i| i.match(/^\s*APACHE2_OPTS/)}
|
||||
records[opts_index] = apache2_opts
|
||||
|
||||
filetype.backup
|
||||
filetype.write(records.join("\n"))
|
||||
@modules = mod_list
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,12 @@
|
||||
Puppet::Type.type(:a2mod).provide :modfix do
|
||||
desc "Dummy provider for A2mod.
|
||||
|
||||
Fake nil resources when there is no crontab binary available. Allows
|
||||
puppetd to run on a bootstrapped machine before a Cron package has been
|
||||
installed. Workaround for: http://projects.puppetlabs.com/issues/2384
|
||||
"
|
||||
|
||||
def self.instances
|
||||
[]
|
||||
end
|
||||
end
|
@@ -0,0 +1,60 @@
|
||||
require 'puppet/provider/a2mod'
|
||||
|
||||
Puppet::Type.type(:a2mod).provide(:redhat, :parent => Puppet::Provider::A2mod) do
|
||||
desc "Manage Apache 2 modules on RedHat family OSs"
|
||||
|
||||
commands :apachectl => "apachectl"
|
||||
|
||||
confine :osfamily => :redhat
|
||||
defaultfor :osfamily => :redhat
|
||||
|
||||
require 'pathname'
|
||||
|
||||
# modpath: Path to default apache modules directory /etc/httpd/mod.d
|
||||
# modfile: Path to module load configuration file; Default: resides under modpath directory
|
||||
# libfile: Path to actual apache module library. Added in modfile LoadModule
|
||||
|
||||
attr_accessor :modfile, :libfile
|
||||
class << self
|
||||
attr_accessor :modpath
|
||||
def preinit
|
||||
@modpath = "/etc/httpd/mod.d"
|
||||
end
|
||||
end
|
||||
|
||||
self.preinit
|
||||
|
||||
def create
|
||||
File.open(modfile,'w') do |f|
|
||||
f.puts "LoadModule #{resource[:identifier]} #{libfile}"
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
File.delete(modfile)
|
||||
end
|
||||
|
||||
def self.instances
|
||||
modules = apachectl("-M").lines.collect { |line|
|
||||
m = line.match(/(\w+)_module \(shared\)$/)
|
||||
m[1] if m
|
||||
}.compact
|
||||
|
||||
modules.map do |mod|
|
||||
new(
|
||||
:name => mod,
|
||||
:ensure => :present,
|
||||
:provider => :redhat
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def modfile
|
||||
modfile ||= "#{self.class.modpath}/#{resource[:name]}.load"
|
||||
end
|
||||
|
||||
# Set libfile path: If absolute path is passed, then maintain it. Else, make it default from 'modules' dir.
|
||||
def libfile
|
||||
libfile = Pathname.new(resource[:lib]).absolute? ? resource[:lib] : "modules/#{resource[:lib]}"
|
||||
end
|
||||
end
|
30
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb
vendored
Normal file
30
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
Puppet::Type.newtype(:a2mod) do
|
||||
@doc = "Manage Apache 2 modules"
|
||||
|
||||
ensurable
|
||||
|
||||
newparam(:name) do
|
||||
Puppet.warning "The a2mod provider is deprecated, please use apache::mod instead"
|
||||
desc "The name of the module to be managed"
|
||||
|
||||
isnamevar
|
||||
|
||||
end
|
||||
|
||||
newparam(:lib) do
|
||||
desc "The name of the .so library to be loaded"
|
||||
|
||||
defaultto { "mod_#{@resource[:name]}.so" }
|
||||
end
|
||||
|
||||
newparam(:identifier) do
|
||||
desc "Module identifier string used by LoadModule. Default: module-name_module"
|
||||
|
||||
# http://httpd.apache.org/docs/2.2/mod/module-dict.html#ModuleIdentifier
|
||||
|
||||
defaultto { "#{resource[:name]}_module" }
|
||||
end
|
||||
|
||||
autorequire(:package) { catalog.resource(:package, 'httpd')}
|
||||
|
||||
end
|
83
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/balancer.pp
vendored
Normal file
83
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/balancer.pp
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
# == Define Resource Type: apache::balancer
|
||||
#
|
||||
# This type will create an apache balancer cluster file inside the conf.d
|
||||
# directory. Each balancer cluster needs one or more balancer members (that can
|
||||
# be declared with the apache::balancermember defined resource type). Using
|
||||
# storeconfigs, you can export the apache::balancermember resources on all
|
||||
# balancer members, and then collect them on a single apache load balancer
|
||||
# server.
|
||||
#
|
||||
# === Requirement/Dependencies:
|
||||
#
|
||||
# Currently requires the puppetlabs/concat module on the Puppet Forge and uses
|
||||
# storeconfigs on the Puppet Master to export/collect resources from all
|
||||
# balancer members.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*name*]
|
||||
# The namevar of the defined resource type is the balancer clusters name.
|
||||
# This name is also used in the name of the conf.d file
|
||||
#
|
||||
# [*proxy_set*]
|
||||
# Hash, default empty. If given, each key-value pair will be used as a ProxySet
|
||||
# line in the configuration.
|
||||
#
|
||||
# [*collect_exported*]
|
||||
# Boolean, default 'true'. True means 'collect exported @@balancermember
|
||||
# resources' (for the case when every balancermember node exports itself),
|
||||
# false means 'rely on the existing declared balancermember resources' (for the
|
||||
# case when you know the full set of balancermembers in advance and use
|
||||
# apache::balancermember with array arguments, which allows you to deploy
|
||||
# everything in 1 run)
|
||||
#
|
||||
#
|
||||
# === Examples
|
||||
#
|
||||
# Exporting the resource for a balancer member:
|
||||
#
|
||||
# apache::balancer { 'puppet00': }
|
||||
#
|
||||
define apache::balancer (
|
||||
$proxy_set = {},
|
||||
$collect_exported = true,
|
||||
) {
|
||||
include concat::setup
|
||||
include ::apache::mod::proxy_balancer
|
||||
|
||||
$target = "${::apache::params::confd_dir}/balancer_${name}.conf"
|
||||
|
||||
concat { $target:
|
||||
owner => '0',
|
||||
group => '0',
|
||||
mode => '0644',
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
|
||||
concat::fragment { "00-${name}-header":
|
||||
ensure => present,
|
||||
target => $target,
|
||||
order => '01',
|
||||
content => "<Proxy balancer://${name}>\n",
|
||||
}
|
||||
|
||||
if $collect_exported {
|
||||
Apache::Balancermember <<| balancer_cluster == $name |>>
|
||||
}
|
||||
# else: the resources have been created and they introduced their
|
||||
# concat fragments. We don't have to do anything about them.
|
||||
|
||||
concat::fragment { "01-${name}-proxyset":
|
||||
ensure => present,
|
||||
target => $target,
|
||||
order => '19',
|
||||
content => inline_template("<% proxy_set.keys.sort.each do |key| %> Proxyset <%= key %>=<%= proxy_set[key] %>\n<% end %>"),
|
||||
}
|
||||
|
||||
concat::fragment { "01-${name}-footer":
|
||||
ensure => present,
|
||||
target => $target,
|
||||
order => '20',
|
||||
content => "</Proxy>\n",
|
||||
}
|
||||
}
|
53
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/balancermember.pp
vendored
Normal file
53
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/balancermember.pp
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# == Define Resource Type: apache::balancermember
|
||||
#
|
||||
# This type will setup a balancer member inside a listening service
|
||||
# configuration block in /etc/apache/apache.cfg on the load balancer.
|
||||
# currently it only has the ability to specify the instance name, url and an
|
||||
# array of options. More features can be added as needed. The best way to
|
||||
# implement this is to export this resource for all apache balancer member
|
||||
# servers, and then collect them on the main apache load balancer.
|
||||
#
|
||||
# === Requirement/Dependencies:
|
||||
#
|
||||
# Currently requires the puppetlabs/concat module on the Puppet Forge and
|
||||
# uses storeconfigs on the Puppet Master to export/collect resources
|
||||
# from all balancer members.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*name*]
|
||||
# The title of the resource is arbitrary and only utilized in the concat
|
||||
# fragment name.
|
||||
#
|
||||
# [*balancer_cluster*]
|
||||
# The apache service's instance name (or, the title of the apache::balancer
|
||||
# resource). This must match up with a declared apache::balancer resource.
|
||||
#
|
||||
# [*url*]
|
||||
# The url used to contact the balancer member server.
|
||||
#
|
||||
# [*options*]
|
||||
# An array of options to be specified after the url.
|
||||
#
|
||||
# === Examples
|
||||
#
|
||||
# Exporting the resource for a balancer member:
|
||||
#
|
||||
# @@apache::balancermember { 'apache':
|
||||
# balancer_cluster => 'puppet00',
|
||||
# url => "ajp://${::fqdn}:8009"
|
||||
# options => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
|
||||
# }
|
||||
#
|
||||
define apache::balancermember(
|
||||
$balancer_cluster,
|
||||
$url = "http://${::fqdn}/",
|
||||
$options = [],
|
||||
) {
|
||||
|
||||
concat::fragment { "BalancerMember ${url}":
|
||||
ensure => present,
|
||||
target => "${::apache::params::confd_dir}/balancer_${balancer_cluster}.conf",
|
||||
content => inline_template(" BalancerMember ${url} <%= @options.join ' ' %>\n"),
|
||||
}
|
||||
}
|
10
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp
vendored
Normal file
10
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
class apache::confd::no_accf {
|
||||
# Template uses no variables
|
||||
file { 'no-accf.conf':
|
||||
ensure => 'file',
|
||||
path => "${::apache::confd_dir}/no-accf.conf",
|
||||
content => template('apache/confd/no-accf.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::confd_dir}"],
|
||||
before => File[$::apache::confd_dir],
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
class apache::default_confd_files (
|
||||
$all = true,
|
||||
) {
|
||||
# The rest of the conf.d/* files only get loaded if we want them
|
||||
if $all {
|
||||
case $::osfamily {
|
||||
'freebsd': {
|
||||
include ::apache::confd::no_accf
|
||||
}
|
||||
default: {
|
||||
# do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
158
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/default_mods.pp
vendored
Normal file
158
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/default_mods.pp
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
class apache::default_mods (
|
||||
$all = true,
|
||||
$mods = undef,
|
||||
$apache_version = $::apache::apache_version
|
||||
) {
|
||||
# These are modules required to run the default configuration.
|
||||
# They are not configurable at this time, so we just include
|
||||
# them to make sure it works.
|
||||
case $::osfamily {
|
||||
'redhat', 'freebsd': {
|
||||
::apache::mod { 'log_config': }
|
||||
if versioncmp($apache_version, '2.4') >= 0 {
|
||||
# Lets fork it
|
||||
::apache::mod { 'systemd': }
|
||||
::apache::mod { 'unixd': }
|
||||
}
|
||||
}
|
||||
default: {}
|
||||
}
|
||||
::apache::mod { 'authz_host': }
|
||||
|
||||
# The rest of the modules only get loaded if we want all modules enabled
|
||||
if $all {
|
||||
case $::osfamily {
|
||||
'debian': {
|
||||
include ::apache::mod::reqtimeout
|
||||
}
|
||||
'redhat': {
|
||||
include ::apache::mod::actions
|
||||
include ::apache::mod::cache
|
||||
include ::apache::mod::mime
|
||||
include ::apache::mod::mime_magic
|
||||
include ::apache::mod::vhost_alias
|
||||
include ::apache::mod::suexec
|
||||
include ::apache::mod::rewrite
|
||||
include ::apache::mod::speling
|
||||
::apache::mod { 'auth_digest': }
|
||||
::apache::mod { 'authn_anon': }
|
||||
::apache::mod { 'authn_dbm': }
|
||||
::apache::mod { 'authz_dbm': }
|
||||
::apache::mod { 'authz_owner': }
|
||||
::apache::mod { 'expires': }
|
||||
::apache::mod { 'ext_filter': }
|
||||
::apache::mod { 'include': }
|
||||
::apache::mod { 'logio': }
|
||||
::apache::mod { 'substitute': }
|
||||
::apache::mod { 'usertrack': }
|
||||
::apache::mod { 'version': }
|
||||
|
||||
if versioncmp($apache_version, '2.4') >= 0 {
|
||||
::apache::mod { 'authn_core': }
|
||||
}
|
||||
else {
|
||||
::apache::mod { 'authn_alias': }
|
||||
::apache::mod { 'authn_default': }
|
||||
}
|
||||
}
|
||||
'freebsd': {
|
||||
include ::apache::mod::actions
|
||||
include ::apache::mod::cache
|
||||
include ::apache::mod::disk_cache
|
||||
include ::apache::mod::headers
|
||||
include ::apache::mod::info
|
||||
include ::apache::mod::mime_magic
|
||||
include ::apache::mod::reqtimeout
|
||||
include ::apache::mod::rewrite
|
||||
include ::apache::mod::userdir
|
||||
include ::apache::mod::vhost_alias
|
||||
include ::apache::mod::speling
|
||||
|
||||
::apache::mod { 'asis': }
|
||||
::apache::mod { 'auth_digest': }
|
||||
::apache::mod { 'authn_alias': }
|
||||
::apache::mod { 'authn_anon': }
|
||||
::apache::mod { 'authn_dbm': }
|
||||
::apache::mod { 'authn_default': }
|
||||
::apache::mod { 'authz_dbm': }
|
||||
::apache::mod { 'authz_owner': }
|
||||
::apache::mod { 'cern_meta': }
|
||||
::apache::mod { 'charset_lite': }
|
||||
::apache::mod { 'dumpio': }
|
||||
::apache::mod { 'expires': }
|
||||
::apache::mod { 'file_cache': }
|
||||
::apache::mod { 'filter':}
|
||||
::apache::mod { 'imagemap':}
|
||||
::apache::mod { 'include': }
|
||||
::apache::mod { 'logio': }
|
||||
::apache::mod { 'unique_id': }
|
||||
::apache::mod { 'usertrack': }
|
||||
::apache::mod { 'version': }
|
||||
}
|
||||
default: {}
|
||||
}
|
||||
case $::apache::mpm_module {
|
||||
'prefork': {
|
||||
include ::apache::mod::cgi
|
||||
}
|
||||
'worker': {
|
||||
include ::apache::mod::cgid
|
||||
}
|
||||
default: {
|
||||
# do nothing
|
||||
}
|
||||
}
|
||||
include ::apache::mod::alias
|
||||
include ::apache::mod::autoindex
|
||||
include ::apache::mod::dav
|
||||
include ::apache::mod::dav_fs
|
||||
include ::apache::mod::deflate
|
||||
include ::apache::mod::dir
|
||||
include ::apache::mod::mime
|
||||
include ::apache::mod::negotiation
|
||||
include ::apache::mod::setenvif
|
||||
::apache::mod { 'auth_basic': }
|
||||
::apache::mod { 'authn_file': }
|
||||
|
||||
if versioncmp($apache_version, '2.4') >= 0 {
|
||||
# authz_core is needed for 'Require' directive
|
||||
::apache::mod { 'authz_core':
|
||||
id => 'authz_core_module',
|
||||
}
|
||||
|
||||
# filter is needed by mod_deflate
|
||||
::apache::mod { 'filter': }
|
||||
|
||||
# lots of stuff seems to break without access_compat
|
||||
::apache::mod { 'access_compat': }
|
||||
} else {
|
||||
::apache::mod { 'authz_default': }
|
||||
}
|
||||
|
||||
::apache::mod { 'authz_groupfile': }
|
||||
::apache::mod { 'authz_user': }
|
||||
::apache::mod { 'env': }
|
||||
} elsif $mods {
|
||||
::apache::default_mods::load { $mods: }
|
||||
|
||||
if versioncmp($apache_version, '2.4') >= 0 {
|
||||
# authz_core is needed for 'Require' directive
|
||||
::apache::mod { 'authz_core':
|
||||
id => 'authz_core_module',
|
||||
}
|
||||
|
||||
# filter is needed by mod_deflate
|
||||
::apache::mod { 'filter': }
|
||||
}
|
||||
} else {
|
||||
if versioncmp($apache_version, '2.4') >= 0 {
|
||||
# authz_core is needed for 'Require' directive
|
||||
::apache::mod { 'authz_core':
|
||||
id => 'authz_core_module',
|
||||
}
|
||||
|
||||
# filter is needed by mod_deflate
|
||||
::apache::mod { 'filter': }
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
# private define
|
||||
define apache::default_mods::load ($module = $title) {
|
||||
if defined("apache::mod::${module}") {
|
||||
include "::apache::mod::${module}"
|
||||
} else {
|
||||
::apache::mod { $module: }
|
||||
}
|
||||
}
|
11
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/dev.pp
vendored
Normal file
11
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/dev.pp
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
class apache::dev {
|
||||
if $::osfamily == 'FreeBSD' and !defined(Class['apache::package']) {
|
||||
fail('apache::dev requires apache::package; please include apache or apache::package class first')
|
||||
}
|
||||
include ::apache::params
|
||||
$packages = $::apache::params::dev_packages
|
||||
package { $packages:
|
||||
ensure => present,
|
||||
require => Package['httpd'],
|
||||
}
|
||||
}
|
340
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/init.pp
vendored
Normal file
340
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/init.pp
vendored
Normal file
@@ -0,0 +1,340 @@
|
||||
# Class: apache
|
||||
#
|
||||
# This class installs Apache
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# Actions:
|
||||
# - Install Apache
|
||||
# - Manage Apache service
|
||||
#
|
||||
# Requires:
|
||||
#
|
||||
# Sample Usage:
|
||||
#
|
||||
class apache (
|
||||
$service_name = $::apache::params::service_name,
|
||||
$default_mods = true,
|
||||
$default_vhost = true,
|
||||
$default_confd_files = true,
|
||||
$default_ssl_vhost = false,
|
||||
$default_ssl_cert = $::apache::params::default_ssl_cert,
|
||||
$default_ssl_key = $::apache::params::default_ssl_key,
|
||||
$default_ssl_chain = undef,
|
||||
$default_ssl_ca = undef,
|
||||
$default_ssl_crl_path = undef,
|
||||
$default_ssl_crl = undef,
|
||||
$ip = undef,
|
||||
$service_enable = true,
|
||||
$service_ensure = 'running',
|
||||
$purge_configs = true,
|
||||
$purge_vdir = false,
|
||||
$serveradmin = 'root@localhost',
|
||||
$sendfile = 'On',
|
||||
$error_documents = false,
|
||||
$timeout = '120',
|
||||
$httpd_dir = $::apache::params::httpd_dir,
|
||||
$server_root = $::apache::params::server_root,
|
||||
$confd_dir = $::apache::params::confd_dir,
|
||||
$vhost_dir = $::apache::params::vhost_dir,
|
||||
$vhost_enable_dir = $::apache::params::vhost_enable_dir,
|
||||
$mod_dir = $::apache::params::mod_dir,
|
||||
$mod_enable_dir = $::apache::params::mod_enable_dir,
|
||||
$mpm_module = $::apache::params::mpm_module,
|
||||
$conf_template = $::apache::params::conf_template,
|
||||
$servername = $::apache::params::servername,
|
||||
$manage_user = true,
|
||||
$manage_group = true,
|
||||
$user = $::apache::params::user,
|
||||
$group = $::apache::params::group,
|
||||
$keepalive = $::apache::params::keepalive,
|
||||
$keepalive_timeout = $::apache::params::keepalive_timeout,
|
||||
$max_keepalive_requests = $apache::params::max_keepalive_requests,
|
||||
$logroot = $::apache::params::logroot,
|
||||
$log_level = $::apache::params::log_level,
|
||||
$log_formats = {},
|
||||
$ports_file = $::apache::params::ports_file,
|
||||
$apache_version = $::apache::version::default,
|
||||
$server_tokens = 'OS',
|
||||
$server_signature = 'On',
|
||||
$trace_enable = 'On',
|
||||
$package_ensure = 'installed',
|
||||
) inherits ::apache::params {
|
||||
validate_bool($default_vhost)
|
||||
validate_bool($default_ssl_vhost)
|
||||
validate_bool($default_confd_files)
|
||||
# true/false is sufficient for both ensure and enable
|
||||
validate_bool($service_enable)
|
||||
|
||||
$valid_mpms_re = $apache_version ? {
|
||||
'2.4' => '(event|itk|peruser|prefork|worker)',
|
||||
default => '(event|itk|prefork|worker)'
|
||||
}
|
||||
|
||||
if $mpm_module {
|
||||
validate_re($mpm_module, $valid_mpms_re)
|
||||
}
|
||||
|
||||
# NOTE: on FreeBSD it's mpm module's responsibility to install httpd package.
|
||||
# NOTE: the same strategy may be introduced for other OSes. For this, you
|
||||
# should delete the 'if' block below and modify all MPM modules' manifests
|
||||
# such that they include apache::package class (currently event.pp, itk.pp,
|
||||
# peruser.pp, prefork.pp, worker.pp).
|
||||
if $::osfamily != 'FreeBSD' {
|
||||
package { 'httpd':
|
||||
ensure => $package_ensure,
|
||||
name => $::apache::params::apache_name,
|
||||
notify => Class['Apache::Service'],
|
||||
}
|
||||
}
|
||||
validate_re($sendfile, [ '^[oO]n$' , '^[oO]ff$' ])
|
||||
|
||||
# declare the web server user and group
|
||||
# Note: requiring the package means the package ought to create them and not puppet
|
||||
validate_bool($manage_user)
|
||||
if $manage_user {
|
||||
user { $user:
|
||||
ensure => present,
|
||||
gid => $group,
|
||||
require => Package['httpd'],
|
||||
}
|
||||
}
|
||||
validate_bool($manage_group)
|
||||
if $manage_group {
|
||||
group { $group:
|
||||
ensure => present,
|
||||
require => Package['httpd']
|
||||
}
|
||||
}
|
||||
|
||||
$valid_log_level_re = '(emerg|alert|crit|error|warn|notice|info|debug)'
|
||||
|
||||
validate_re($log_level, $valid_log_level_re,
|
||||
"Log level '${log_level}' is not one of the supported Apache HTTP Server log levels.")
|
||||
|
||||
class { '::apache::service':
|
||||
service_name => $service_name,
|
||||
service_enable => $service_enable,
|
||||
service_ensure => $service_ensure,
|
||||
}
|
||||
|
||||
# Deprecated backwards-compatibility
|
||||
if $purge_vdir {
|
||||
warning('Class[\'apache\'] parameter purge_vdir is deprecated in favor of purge_configs')
|
||||
$purge_confd = $purge_vdir
|
||||
} else {
|
||||
$purge_confd = $purge_configs
|
||||
}
|
||||
|
||||
Exec {
|
||||
path => '/bin:/sbin:/usr/bin:/usr/sbin',
|
||||
}
|
||||
|
||||
exec { "mkdir ${confd_dir}":
|
||||
creates => $confd_dir,
|
||||
require => Package['httpd'],
|
||||
}
|
||||
file { $confd_dir:
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
purge => $purge_confd,
|
||||
notify => Class['Apache::Service'],
|
||||
require => Package['httpd'],
|
||||
}
|
||||
|
||||
if ! defined(File[$mod_dir]) {
|
||||
exec { "mkdir ${mod_dir}":
|
||||
creates => $mod_dir,
|
||||
require => Package['httpd'],
|
||||
}
|
||||
# Don't purge available modules if an enable dir is used
|
||||
$purge_mod_dir = $purge_configs and !$mod_enable_dir
|
||||
file { $mod_dir:
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
purge => $purge_mod_dir,
|
||||
notify => Class['Apache::Service'],
|
||||
require => Package['httpd'],
|
||||
}
|
||||
}
|
||||
|
||||
if $mod_enable_dir and ! defined(File[$mod_enable_dir]) {
|
||||
$mod_load_dir = $mod_enable_dir
|
||||
exec { "mkdir ${mod_enable_dir}":
|
||||
creates => $mod_enable_dir,
|
||||
require => Package['httpd'],
|
||||
}
|
||||
file { $mod_enable_dir:
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
purge => $purge_configs,
|
||||
notify => Class['Apache::Service'],
|
||||
require => Package['httpd'],
|
||||
}
|
||||
} else {
|
||||
$mod_load_dir = $mod_dir
|
||||
}
|
||||
|
||||
if ! defined(File[$vhost_dir]) {
|
||||
exec { "mkdir ${vhost_dir}":
|
||||
creates => $vhost_dir,
|
||||
require => Package['httpd'],
|
||||
}
|
||||
file { $vhost_dir:
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
purge => $purge_configs,
|
||||
notify => Class['Apache::Service'],
|
||||
require => Package['httpd'],
|
||||
}
|
||||
}
|
||||
|
||||
if $vhost_enable_dir and ! defined(File[$vhost_enable_dir]) {
|
||||
$vhost_load_dir = $vhost_enable_dir
|
||||
exec { "mkdir ${vhost_load_dir}":
|
||||
creates => $vhost_load_dir,
|
||||
require => Package['httpd'],
|
||||
}
|
||||
file { $vhost_enable_dir:
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
purge => $purge_configs,
|
||||
notify => Class['Apache::Service'],
|
||||
require => Package['httpd'],
|
||||
}
|
||||
} else {
|
||||
$vhost_load_dir = $vhost_dir
|
||||
}
|
||||
|
||||
concat { $ports_file:
|
||||
owner => 'root',
|
||||
group => $::apache::params::root_group,
|
||||
mode => '0644',
|
||||
notify => Class['Apache::Service'],
|
||||
require => Package['httpd'],
|
||||
}
|
||||
concat::fragment { 'Apache ports header':
|
||||
ensure => present,
|
||||
target => $ports_file,
|
||||
content => template('apache/ports_header.erb')
|
||||
}
|
||||
|
||||
if $::apache::params::conf_dir and $::apache::params::conf_file {
|
||||
case $::osfamily {
|
||||
'debian': {
|
||||
$docroot = '/var/www'
|
||||
$pidfile = '${APACHE_PID_FILE}'
|
||||
$error_log = 'error.log'
|
||||
$error_documents_path = '/usr/share/apache2/error'
|
||||
$scriptalias = '/usr/lib/cgi-bin'
|
||||
$access_log_file = 'access.log'
|
||||
}
|
||||
'redhat': {
|
||||
$docroot = '/var/www/html'
|
||||
$pidfile = 'run/httpd.pid'
|
||||
$error_log = 'error_log'
|
||||
$error_documents_path = '/var/www/error'
|
||||
$scriptalias = '/var/www/cgi-bin'
|
||||
$access_log_file = 'access_log'
|
||||
}
|
||||
'freebsd': {
|
||||
$docroot = '/usr/local/www/apache22/data'
|
||||
$pidfile = '/var/run/httpd.pid'
|
||||
$error_log = 'httpd-error.log'
|
||||
$error_documents_path = '/usr/local/www/apache22/error'
|
||||
$scriptalias = '/usr/local/www/apache22/cgi-bin'
|
||||
$access_log_file = 'httpd-access.log'
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily ${::osfamily}")
|
||||
}
|
||||
}
|
||||
|
||||
$apxs_workaround = $::osfamily ? {
|
||||
'freebsd' => true,
|
||||
default => false
|
||||
}
|
||||
|
||||
# Template uses:
|
||||
# - $pidfile
|
||||
# - $user
|
||||
# - $group
|
||||
# - $logroot
|
||||
# - $error_log
|
||||
# - $sendfile
|
||||
# - $mod_dir
|
||||
# - $ports_file
|
||||
# - $confd_dir
|
||||
# - $vhost_dir
|
||||
# - $error_documents
|
||||
# - $error_documents_path
|
||||
# - $apxs_workaround
|
||||
# - $keepalive
|
||||
# - $keepalive_timeout
|
||||
# - $max_keepalive_requests
|
||||
# - $server_root
|
||||
# - $server_tokens
|
||||
# - $server_signature
|
||||
# - $trace_enable
|
||||
file { "${::apache::params::conf_dir}/${::apache::params::conf_file}":
|
||||
ensure => file,
|
||||
content => template($conf_template),
|
||||
notify => Class['Apache::Service'],
|
||||
require => Package['httpd'],
|
||||
}
|
||||
|
||||
# preserve back-wards compatibility to the times when default_mods was
|
||||
# only a boolean value. Now it can be an array (too)
|
||||
if is_array($default_mods) {
|
||||
class { '::apache::default_mods':
|
||||
all => false,
|
||||
mods => $default_mods,
|
||||
}
|
||||
} else {
|
||||
class { '::apache::default_mods':
|
||||
all => $default_mods,
|
||||
}
|
||||
}
|
||||
class { '::apache::default_confd_files':
|
||||
all => $default_confd_files
|
||||
}
|
||||
if $mpm_module {
|
||||
class { "::apache::mod::${mpm_module}": }
|
||||
}
|
||||
|
||||
$default_vhost_ensure = $default_vhost ? {
|
||||
true => 'present',
|
||||
false => 'absent'
|
||||
}
|
||||
$default_ssl_vhost_ensure = $default_ssl_vhost ? {
|
||||
true => 'present',
|
||||
false => 'absent'
|
||||
}
|
||||
|
||||
::apache::vhost { 'default':
|
||||
ensure => $default_vhost_ensure,
|
||||
port => 80,
|
||||
docroot => $docroot,
|
||||
scriptalias => $scriptalias,
|
||||
serveradmin => $serveradmin,
|
||||
access_log_file => $access_log_file,
|
||||
priority => '15',
|
||||
ip => $ip,
|
||||
}
|
||||
$ssl_access_log_file = $::osfamily ? {
|
||||
'freebsd' => $access_log_file,
|
||||
default => "ssl_${access_log_file}",
|
||||
}
|
||||
::apache::vhost { 'default-ssl':
|
||||
ensure => $default_ssl_vhost_ensure,
|
||||
port => 443,
|
||||
ssl => true,
|
||||
docroot => $docroot,
|
||||
scriptalias => $scriptalias,
|
||||
serveradmin => $serveradmin,
|
||||
access_log_file => $ssl_access_log_file,
|
||||
priority => '15',
|
||||
ip => $ip,
|
||||
}
|
||||
}
|
||||
}
|
10
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/listen.pp
vendored
Normal file
10
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/listen.pp
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
define apache::listen {
|
||||
$listen_addr_port = $name
|
||||
|
||||
# Template uses: $listen_addr_port
|
||||
concat::fragment { "Listen ${listen_addr_port}":
|
||||
ensure => present,
|
||||
target => $::apache::ports_file,
|
||||
content => template('apache/listen.erb'),
|
||||
}
|
||||
}
|
130
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod.pp
vendored
Normal file
130
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod.pp
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
define apache::mod (
|
||||
$package = undef,
|
||||
$package_ensure = 'present',
|
||||
$lib = undef,
|
||||
$lib_path = $::apache::params::lib_path,
|
||||
$id = undef,
|
||||
$path = undef,
|
||||
$loadfile_name = undef,
|
||||
$loadfiles = undef,
|
||||
) {
|
||||
if ! defined(Class['apache']) {
|
||||
fail('You must include the apache base class before using any apache defined resources')
|
||||
}
|
||||
|
||||
$mod = $name
|
||||
#include apache #This creates duplicate resources in rspec-puppet
|
||||
$mod_dir = $::apache::mod_dir
|
||||
|
||||
# Determine if we have special lib
|
||||
$mod_libs = $::apache::params::mod_libs
|
||||
$mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
|
||||
if $lib {
|
||||
$_lib = $lib
|
||||
} elsif $mod_lib {
|
||||
$_lib = $mod_lib
|
||||
} else {
|
||||
$_lib = "mod_${mod}.so"
|
||||
}
|
||||
|
||||
# Determine if declaration specified a path to the module
|
||||
if $path {
|
||||
$_path = $path
|
||||
} else {
|
||||
$_path = "${lib_path}/${_lib}"
|
||||
}
|
||||
|
||||
if $id {
|
||||
$_id = $id
|
||||
} else {
|
||||
$_id = "${mod}_module"
|
||||
}
|
||||
|
||||
if $loadfile_name {
|
||||
$_loadfile_name = $loadfile_name
|
||||
} else {
|
||||
$_loadfile_name = "${mod}.load"
|
||||
}
|
||||
|
||||
# Determine if we have a package
|
||||
$mod_packages = $::apache::params::mod_packages
|
||||
$mod_package = $mod_packages[$mod] # 2.6 compatibility hack
|
||||
if $package {
|
||||
$_package = $package
|
||||
} elsif $mod_package {
|
||||
$_package = $mod_package
|
||||
} else {
|
||||
$_package = undef
|
||||
}
|
||||
if $_package and ! defined(Package[$_package]) {
|
||||
# note: FreeBSD/ports uses apxs tool to activate modules; apxs clutters
|
||||
# httpd.conf with 'LoadModule' directives; here, by proper resource
|
||||
# ordering, we ensure that our version of httpd.conf is reverted after
|
||||
# the module gets installed.
|
||||
$package_before = $::osfamily ? {
|
||||
'freebsd' => [
|
||||
File[$_loadfile_name],
|
||||
File["${::apache::params::conf_dir}/${::apache::params::conf_file}"]
|
||||
],
|
||||
default => File[$_loadfile_name],
|
||||
}
|
||||
# $_package may be an array
|
||||
package { $_package:
|
||||
ensure => $package_ensure,
|
||||
require => Package['httpd'],
|
||||
before => $package_before,
|
||||
}
|
||||
}
|
||||
|
||||
file { "${_loadfile_name}":
|
||||
ensure => file,
|
||||
path => "${mod_dir}/${_loadfile_name}",
|
||||
owner => 'root',
|
||||
group => $::apache::params::root_group,
|
||||
mode => '0644',
|
||||
content => template('apache/mod/load.erb'),
|
||||
require => [
|
||||
Package['httpd'],
|
||||
Exec["mkdir ${mod_dir}"],
|
||||
],
|
||||
before => File[$mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
|
||||
if $::osfamily == 'Debian' {
|
||||
$enable_dir = $::apache::mod_enable_dir
|
||||
file{ "${_loadfile_name} symlink":
|
||||
ensure => link,
|
||||
path => "${enable_dir}/${_loadfile_name}",
|
||||
target => "${mod_dir}/${_loadfile_name}",
|
||||
owner => 'root',
|
||||
group => $::apache::params::root_group,
|
||||
mode => '0644',
|
||||
require => [
|
||||
File[$_loadfile_name],
|
||||
Exec["mkdir ${enable_dir}"],
|
||||
],
|
||||
before => File[$enable_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
# Each module may have a .conf file as well, which should be
|
||||
# defined in the class apache::mod::module
|
||||
# Some modules do not require this file.
|
||||
if defined(File["${mod}.conf"]) {
|
||||
file{ "${mod}.conf symlink":
|
||||
ensure => link,
|
||||
path => "${enable_dir}/${mod}.conf",
|
||||
target => "${mod_dir}/${mod}.conf",
|
||||
owner => 'root',
|
||||
group => $::apache::params::root_group,
|
||||
mode => '0644',
|
||||
require => [
|
||||
File["${mod}.conf"],
|
||||
Exec["mkdir ${enable_dir}"],
|
||||
],
|
||||
before => File[$enable_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
3
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/actions.pp
vendored
Normal file
3
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/actions.pp
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
class apache::mod::actions {
|
||||
apache::mod { 'actions': }
|
||||
}
|
19
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/alias.pp
vendored
Normal file
19
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/alias.pp
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
class apache::mod::alias(
|
||||
$apache_version = $apache::apache_version
|
||||
) {
|
||||
$icons_path = $::osfamily ? {
|
||||
'debian' => '/usr/share/apache2/icons',
|
||||
'redhat' => '/var/www/icons',
|
||||
'freebsd' => '/usr/local/www/apache22/icons',
|
||||
}
|
||||
apache::mod { 'alias': }
|
||||
# Template uses $icons_path
|
||||
file { 'alias.conf':
|
||||
ensure => file,
|
||||
path => "${::apache::mod_dir}/alias.conf",
|
||||
content => template('apache/mod/alias.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::mod_dir}"],
|
||||
before => File[$::apache::mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
}
|
3
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp
vendored
Normal file
3
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
class apache::mod::auth_basic {
|
||||
::apache::mod { 'auth_basic': }
|
||||
}
|
5
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp
vendored
Normal file
5
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
class apache::mod::auth_kerb {
|
||||
::apache::mod { 'auth_kerb': }
|
||||
}
|
||||
|
||||
|
19
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp
vendored
Normal file
19
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
class apache::mod::authnz_ldap (
|
||||
$verifyServerCert = true,
|
||||
) {
|
||||
include '::apache::mod::ldap'
|
||||
::apache::mod { 'authnz_ldap': }
|
||||
|
||||
validate_bool($verifyServerCert)
|
||||
|
||||
# Template uses:
|
||||
# - $verifyServerCert
|
||||
file { 'authnz_ldap.conf':
|
||||
ensure => file,
|
||||
path => "${::apache::mod_dir}/authnz_ldap.conf",
|
||||
content => template('apache/mod/authnz_ldap.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::mod_dir}"],
|
||||
before => File[$::apache::mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
}
|
12
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp
vendored
Normal file
12
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
class apache::mod::autoindex {
|
||||
::apache::mod { 'autoindex': }
|
||||
# Template uses no variables
|
||||
file { 'autoindex.conf':
|
||||
ensure => file,
|
||||
path => "${::apache::mod_dir}/autoindex.conf",
|
||||
content => template('apache/mod/autoindex.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::mod_dir}"],
|
||||
before => File[$::apache::mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
}
|
3
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/cache.pp
vendored
Normal file
3
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/cache.pp
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
class apache::mod::cache {
|
||||
::apache::mod { 'cache': }
|
||||
}
|
4
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/cgi.pp
vendored
Normal file
4
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/cgi.pp
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
class apache::mod::cgi {
|
||||
Class['::apache::mod::prefork'] -> Class['::apache::mod::cgi']
|
||||
::apache::mod { 'cgi': }
|
||||
}
|
23
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/cgid.pp
vendored
Normal file
23
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/cgid.pp
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
class apache::mod::cgid {
|
||||
Class['::apache::mod::worker'] -> Class['::apache::mod::cgid']
|
||||
|
||||
# Debian specifies it's cgid sock path, but RedHat uses the default value
|
||||
# with no config file
|
||||
$cgisock_path = $::osfamily ? {
|
||||
'debian' => '${APACHE_RUN_DIR}/cgisock',
|
||||
'freebsd' => 'cgisock',
|
||||
default => undef,
|
||||
}
|
||||
::apache::mod { 'cgid': }
|
||||
if $cgisock_path {
|
||||
# Template uses $cgisock_path
|
||||
file { 'cgid.conf':
|
||||
ensure => file,
|
||||
path => "${::apache::mod_dir}/cgid.conf",
|
||||
content => template('apache/mod/cgid.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::mod_dir}"],
|
||||
before => File[$::apache::mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
}
|
||||
}
|
3
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/dav.pp
vendored
Normal file
3
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/dav.pp
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
class apache::mod::dav {
|
||||
::apache::mod { 'dav': }
|
||||
}
|
20
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp
vendored
Normal file
20
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
class apache::mod::dav_fs {
|
||||
$dav_lock = $::osfamily ? {
|
||||
'debian' => '${APACHE_LOCK_DIR}/DAVLock',
|
||||
'freebsd' => '/usr/local/var/DavLock',
|
||||
default => '/var/lib/dav/lockdb',
|
||||
}
|
||||
|
||||
Class['::apache::mod::dav'] -> Class['::apache::mod::dav_fs']
|
||||
::apache::mod { 'dav_fs': }
|
||||
|
||||
# Template uses: $dav_lock
|
||||
file { 'dav_fs.conf':
|
||||
ensure => file,
|
||||
path => "${::apache::mod_dir}/dav_fs.conf",
|
||||
content => template('apache/mod/dav_fs.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::mod_dir}"],
|
||||
before => File[$::apache::mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
}
|
14
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp
vendored
Normal file
14
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
class apache::mod::dav_svn (
|
||||
$authz_svn_enabled = false,
|
||||
) {
|
||||
Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn']
|
||||
include ::apache::mod::dav
|
||||
::apache::mod { 'dav_svn': }
|
||||
|
||||
if $authz_svn_enabled {
|
||||
::apache::mod { 'authz_svn':
|
||||
loadfile_name => 'dav_svn_authz_svn.load',
|
||||
require => Apache::Mod['dav_svn'],
|
||||
}
|
||||
}
|
||||
}
|
12
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/deflate.pp
vendored
Normal file
12
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/deflate.pp
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
class apache::mod::deflate {
|
||||
::apache::mod { 'deflate': }
|
||||
# Template uses no variables
|
||||
file { 'deflate.conf':
|
||||
ensure => file,
|
||||
path => "${::apache::mod_dir}/deflate.conf",
|
||||
content => template('apache/mod/deflate.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::mod_dir}"],
|
||||
before => File[$::apache::mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
}
|
5
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/dev.pp
vendored
Normal file
5
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/dev.pp
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
class apache::mod::dev {
|
||||
# Development packages are not apache modules
|
||||
warning('apache::mod::dev is deprecated; please use apache::dev')
|
||||
include ::apache::dev
|
||||
}
|
21
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/dir.pp
vendored
Normal file
21
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/dir.pp
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Note: this sets the global DirectoryIndex directive, it may be necessary to consider being able to modify the apache::vhost to declare DirectoryIndex statements in a vhost configuration
|
||||
# Parameters:
|
||||
# - $indexes provides a string for the DirectoryIndex directive http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex
|
||||
class apache::mod::dir (
|
||||
$dir = 'public_html',
|
||||
$indexes = ['index.html','index.html.var','index.cgi','index.pl','index.php','index.xhtml'],
|
||||
) {
|
||||
validate_array($indexes)
|
||||
::apache::mod { 'dir': }
|
||||
|
||||
# Template uses
|
||||
# - $indexes
|
||||
file { 'dir.conf':
|
||||
ensure => file,
|
||||
path => "${::apache::mod_dir}/dir.conf",
|
||||
content => template('apache/mod/dir.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::mod_dir}"],
|
||||
before => File[$::apache::mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
}
|
24
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp
vendored
Normal file
24
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
class apache::mod::disk_cache {
|
||||
$cache_root = $::osfamily ? {
|
||||
'debian' => '/var/cache/apache2/mod_disk_cache',
|
||||
'redhat' => '/var/cache/mod_proxy',
|
||||
'freebsd' => '/var/cache/mod_disk_cache',
|
||||
}
|
||||
if $::osfamily != 'FreeBSD' {
|
||||
# FIXME: investigate why disk_cache was dependent on proxy
|
||||
# NOTE: on FreeBSD disk_cache is compiled by default but proxy is not
|
||||
Class['::apache::mod::proxy'] -> Class['::apache::mod::disk_cache']
|
||||
}
|
||||
Class['::apache::mod::cache'] -> Class['::apache::mod::disk_cache']
|
||||
|
||||
apache::mod { 'disk_cache': }
|
||||
# Template uses $cache_proxy
|
||||
file { 'disk_cache.conf':
|
||||
ensure => file,
|
||||
path => "${::apache::mod_dir}/disk_cache.conf",
|
||||
content => template('apache/mod/disk_cache.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::mod_dir}"],
|
||||
before => File[$::apache::mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
}
|
62
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/event.pp
vendored
Normal file
62
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/event.pp
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
class apache::mod::event (
|
||||
$startservers = '2',
|
||||
$maxclients = '150',
|
||||
$minsparethreads = '25',
|
||||
$maxsparethreads = '75',
|
||||
$threadsperchild = '25',
|
||||
$maxrequestsperchild = '0',
|
||||
$serverlimit = '25',
|
||||
$apache_version = $::apache::apache_version,
|
||||
) {
|
||||
if defined(Class['apache::mod::itk']) {
|
||||
fail('May not include both apache::mod::event and apache::mod::itk on the same node')
|
||||
}
|
||||
if defined(Class['apache::mod::peruser']) {
|
||||
fail('May not include both apache::mod::event and apache::mod::peruser on the same node')
|
||||
}
|
||||
if defined(Class['apache::mod::prefork']) {
|
||||
fail('May not include both apache::mod::event and apache::mod::prefork on the same node')
|
||||
}
|
||||
if defined(Class['apache::mod::worker']) {
|
||||
fail('May not include both apache::mod::event and apache::mod::worker on the same node')
|
||||
}
|
||||
File {
|
||||
owner => 'root',
|
||||
group => $::apache::params::root_group,
|
||||
mode => '0644',
|
||||
}
|
||||
|
||||
# Template uses:
|
||||
# - $startservers
|
||||
# - $maxclients
|
||||
# - $minsparethreads
|
||||
# - $maxsparethreads
|
||||
# - $threadsperchild
|
||||
# - $maxrequestsperchild
|
||||
# - $serverlimit
|
||||
file { "${::apache::mod_dir}/event.conf":
|
||||
ensure => file,
|
||||
content => template('apache/mod/event.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::mod_dir}"],
|
||||
before => File[$::apache::mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
|
||||
case $::osfamily {
|
||||
'redhat': {
|
||||
if versioncmp($apache_version, '2.4') >= 0 {
|
||||
apache::mpm{ 'event':
|
||||
apache_version => $apache_version,
|
||||
}
|
||||
}
|
||||
}
|
||||
'debian','freebsd' : {
|
||||
apache::mpm{ 'event':
|
||||
apache_version => $apache_version,
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily ${::osfamily}")
|
||||
}
|
||||
}
|
||||
}
|
3
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/expires.pp
vendored
Normal file
3
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/expires.pp
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
class apache::mod::expires {
|
||||
::apache::mod { 'expires': }
|
||||
}
|
24
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp
vendored
Normal file
24
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
class apache::mod::fastcgi {
|
||||
|
||||
# Debian specifies it's fastcgi lib path, but RedHat uses the default value
|
||||
# with no config file
|
||||
$fastcgi_lib_path = $::apache::params::fastcgi_lib_path
|
||||
|
||||
::apache::mod { 'fastcgi': }
|
||||
|
||||
if $fastcgi_lib_path {
|
||||
# Template uses:
|
||||
# - $fastcgi_server
|
||||
# - $fastcgi_socket
|
||||
# - $fastcgi_dir
|
||||
file { 'fastcgi.conf':
|
||||
ensure => file,
|
||||
path => "${::apache::mod_dir}/fastcgi.conf",
|
||||
content => template('apache/mod/fastcgi.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::mod_dir}"],
|
||||
before => File[$::apache::mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
}
|
||||
|
||||
}
|
16
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp
vendored
Normal file
16
vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
class apache::mod::fcgid(
|
||||
$options = {},
|
||||
) {
|
||||
::apache::mod { 'fcgid': }
|
||||
|
||||
# Template uses:
|
||||
# - $options
|
||||
file { 'fcgid.conf':
|
||||
ensure => file,
|
||||
path => "${::apache::mod_dir}/fcgid.conf",
|
||||
content => template('apache/mod/fcgid.conf.erb'),
|
||||
require => Exec["mkdir ${::apache::mod_dir}"],
|
||||
before => File[$::apache::mod_dir],
|
||||
notify => Service['httpd'],
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user