Can disable php now
This commit is contained in:
		
							parent
							
								
									d6bc0db879
								
							
						
					
					
						commit
						f203ab2559
					
				
							
								
								
									
										74
									
								
								apache.cf
								
								
								
								
							
							
						
						
									
										74
									
								
								apache.cf
								
								
								
								
							| 
						 | 
					@ -9,9 +9,39 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bundle agent apache
 | 
					bundle agent apache
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					classes:
 | 
				
			||||||
 | 
					#	"apache enable_php";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
vars:
 | 
					vars:
 | 
				
			||||||
	"admin_email" string => "[]",unless => isvariable( $(this.promiser) ) ;
 | 
						"admin_email" string => "[]",unless => isvariable( $(this.promiser) ) ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						apache_php_enable::
 | 
				
			||||||
 | 
						"php_mod" string => '{m: "$(php.apache_m)",f:"$(php.apache_f)"},';
 | 
				
			||||||
 | 
						"service_deps" slist => {
 | 
				
			||||||
 | 
								"apache_pkgs_installed",
 | 
				
			||||||
 | 
								"apache_php_pkgs_installed",
 | 
				
			||||||
 | 
								"apache_www_dir_created",
 | 
				
			||||||
 | 
								"apache_vhost_dir_created",
 | 
				
			||||||
 | 
								"apache_main_cfg_created"
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"cfg_deps" slist => {  "apache_pkgs_installed","apache_php_installed" };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						!apache_php_enable::
 | 
				
			||||||
 | 
						"php_mod" string => "";
 | 
				
			||||||
 | 
						"service_deps" slist => {
 | 
				
			||||||
 | 
								"apache_pkgs_installed",
 | 
				
			||||||
 | 
								"apache_www_dir_created",
 | 
				
			||||||
 | 
								"apache_vhost_dir_created",
 | 
				
			||||||
 | 
								"apache_main_cfg_created"
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"cfg_deps" slist => {  "apache_pkgs_installed" };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	freebsd::
 | 
						freebsd::
 | 
				
			||||||
		"pkgs" slist => {
 | 
							"pkgs" slist => {
 | 
				
			||||||
			"apache24",
 | 
								"apache24",
 | 
				
			||||||
| 
						 | 
					@ -34,11 +64,11 @@ vars:
 | 
				
			||||||
		"default_html_dir" string => "$(www_dir)/apache24";
 | 
							"default_html_dir" string => "$(www_dir)/apache24";
 | 
				
			||||||
		"server_root" string => "/usr/local";
 | 
							"server_root" string => "/usr/local";
 | 
				
			||||||
		"modules" data => '[ 
 | 
							"modules" data => '[ 
 | 
				
			||||||
 | 
								$(php_mod)
 | 
				
			||||||
			{m: "autoindex",f:"mod_autoindex"},
 | 
								{m: "autoindex",f:"mod_autoindex"},
 | 
				
			||||||
			{m: "log_config",f:"mod_log_config"},
 | 
								{m: "log_config",f:"mod_log_config"},
 | 
				
			||||||
			{m: "version",f:"mod_version"},
 | 
								{m: "version",f:"mod_version"},
 | 
				
			||||||
			{m: "unixd",f:"mod_unixd"},
 | 
								{m: "unixd",f:"mod_unixd"},
 | 
				
			||||||
			{m: "$(php.apache_m)",f:"$(php.apache_f)"},
 | 
					 | 
				
			||||||
			{m: "ssl",f:"mod_ssl"}
 | 
								{m: "ssl",f:"mod_ssl"}
 | 
				
			||||||
		]';
 | 
							]';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -65,11 +95,13 @@ vars:
 | 
				
			||||||
		"server_root" string => "/usr";
 | 
							"server_root" string => "/usr";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		"modules" data => '[
 | 
							"modules" data => '[
 | 
				
			||||||
			{m:"php",f:"libphp8.2"},
 | 
								$(php_mod)
 | 
				
			||||||
			{m:"ssl",f:"mod_ssl"},
 | 
								{m:"ssl",f:"mod_ssl"},
 | 
				
			||||||
			{m:"proxy",f:"mod_proxy"},
 | 
								{m:"proxy",f:"mod_proxy"},
 | 
				
			||||||
			{m:"proxy_fcgi",f:"mod_proxy_fcgi"}
 | 
								{m:"proxy_fcgi",f:"mod_proxy_fcgi"}
 | 
				
			||||||
		]';
 | 
							]';
 | 
				
			||||||
 | 
					#			{m:"php",f:"libphp$(php.version)"},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	centos::
 | 
						centos::
 | 
				
			||||||
| 
						 | 
					@ -131,6 +163,9 @@ vars:
 | 
				
			||||||
			{m: "authz_svn", f:"mod_authz_svn"},
 | 
								{m: "authz_svn", f:"mod_authz_svn"},
 | 
				
			||||||
			{m: "ssl",f:"mod_ssl"}
 | 
								{m: "ssl",f:"mod_ssl"}
 | 
				
			||||||
		]';
 | 
							]';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					reports:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -154,6 +189,8 @@ commands:
 | 
				
			||||||
		args => "-c '/usr/sbin/a2dismod mpm_event > /dev/null'",
 | 
							args => "-c '/usr/sbin/a2dismod mpm_event > /dev/null'",
 | 
				
			||||||
		inform=>"false",
 | 
							inform=>"false",
 | 
				
			||||||
		handle => "apache_mpm_event_disabled";
 | 
							handle => "apache_mpm_event_disabled";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					reports:
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bundle agent install_apache(raw)
 | 
					bundle agent install_apache(raw)
 | 
				
			||||||
| 
						 | 
					@ -163,16 +200,10 @@ methods:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"any" usebundle => wmde_install_packages(@(apache.pkgs),"apache");
 | 
						"any" usebundle => wmde_install_packages(@(apache.pkgs),"apache");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"any" usebundle => install_apache_php,
 | 
						apache_php_enable::
 | 
				
			||||||
 | 
							"any" usebundle => install_apache_php,
 | 
				
			||||||
		depends_on => { "apache_pkgs_installed" };
 | 
							depends_on => { "apache_pkgs_installed" };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#services:
 | 
					 | 
				
			||||||
##	apache_kept::
 | 
					 | 
				
			||||||
#	"$(apache.service_name)"
 | 
					 | 
				
			||||||
#		service_policy => "start";
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
reports:
 | 
					reports:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -206,25 +237,21 @@ files:
 | 
				
			||||||
		edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/httpd.conf.mustache",
 | 
							edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/httpd.conf.mustache",
 | 
				
			||||||
		template_method => "mustache",
 | 
							template_method => "mustache",
 | 
				
			||||||
		handle => "apache_main_cfg_created",
 | 
							handle => "apache_main_cfg_created",
 | 
				
			||||||
		depends_on => { "apache_pkgs_installed","apache_php_installed" },
 | 
							depends_on => { @(apache.cfg_deps) },
 | 
				
			||||||
		classes => if_repaired(apache_repaired);
 | 
							classes => if_repaired(apache_repaired);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
methods:
 | 
					methods:
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"any" usebundle => wmde_service("$(apache.service_name)","apache_kept","apache_repaired|php_repaired"),
 | 
						"any" usebundle => wmde_service("$(apache.service_name)","apache_kept","apache_repaired|php_repaired"),
 | 
				
			||||||
		depends_on => {
 | 
							depends_on => @(apache.service_deps) ;
 | 
				
			||||||
			"apache_pkgs_installed",
 | 
					 | 
				
			||||||
			"apache_php_pkgs_installed",
 | 
					 | 
				
			||||||
			"apache_www_dir_created",
 | 
					 | 
				
			||||||
			"apache_vhost_dir_created",
 | 
					 | 
				
			||||||
			"apache_main_cfg_created"
 | 
					 | 
				
			||||||
		};
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	#depends_on => {
 | 
						#depends_on => {
 | 
				
			||||||
	#	"apache_php_pkgs_installed"
 | 
						#	"apache_php_pkgs_installed"
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
	#};
 | 
						#};
 | 
				
			||||||
 | 
					reports:
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -321,14 +348,6 @@ methods:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
reports:
 | 
					reports:
 | 
				
			||||||
#	"SSL_CERT: $(ssl_cert) $(ssl_key) ";
 | 
					 | 
				
			||||||
#	use_ssl::
 | 
					 | 
				
			||||||
#		"USE SSL";
 | 
					 | 
				
			||||||
#	!use_ssl::
 | 
					 | 
				
			||||||
#		"NOT USE_SSL";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#	"RAW: $(site[raw])";
 | 
					 | 
				
			||||||
#	"APACHE DOCROOT $(site[doc_root])";
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -340,6 +359,5 @@ methods:
 | 
				
			||||||
	"any" usebundle => apache_vhost(@(sites[$(idx)]));
 | 
						"any" usebundle => apache_vhost(@(sites[$(idx)]));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
reports:
 | 
					reports:
 | 
				
			||||||
#	"IDXE $(idx)";
 | 
					 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue