Ado

 view release on metacpan or  search on metacpan

templates/partials/apache2vhost.ep  view on Meta::CPAN

% my $args = shift;
# Virtual host configuaration for  <%=$$args{ServerName}%> served by Ado
# Generated by Ado::Command::generate::apache2vhost using template <%= __FILE__ %>.
# Note! not sure if the produced vhost configuration will work fine for you
# so make sure to test locally first.

<VirtualHost <%=$$args{ServerName}.':'.$$args{port}%>>
% if($$args{with_suexec}){
	<IfModule mod_suexec.c>
		# Make sure to set the proper user and group
		SuexecUserGroup <%= $$args{user} %> <%= $$args{group} %> 
	</IfModule>
% }
  ServerName <%=$$args{ServerName}%>
  ServerAlias <%=$$args{ServerAlias}%>
  ServerAdmin <%=$$args{ServerAdmin}%>
  DocumentRoot <%=$$args{DocumentRoot}%>

  # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
  # error, crit, alert, emerg.
  # It is also possible to configure the loglevel for particular
  # modules, e.g.
  #LogLevel info ssl:warn rewrite:trace3
  LogLevel debug

  ErrorLog  <%=$$args{DocumentRoot}%>/log/apache2_error.log
  CustomLog <%=$$args{DocumentRoot}%>/log/apache2_access.log combined
  
  # Use .htaccess files for overriding and never show them.
  AccessFileName .htaccess
  <FilesMatch "^\.ht">
	  #2.2 configuration:
	  <IfModule !mod_authz_core.c>
	    Order deny,allow
	    Deny from all
	  </IfModule>
	  #2.4 configuration:
	  <IfModule mod_authz_core.c>
	    Require all denied
	  </IfModule> 
  </FilesMatch>
  <Directory "<%=$$args{DocumentRoot}%>">
    Options +Indexes +FollowSymLinks +ExecCGI
    AllowOverride All    
    #AllowOverride None
		#see http://httpd.apache.org/docs/2.4/upgrading.html
	  #2.2 configuration:
	  <IfModule !mod_authz_core.c>
	    Order deny,allow
	    Allow from all
	  </IfModule>
	  #2.4 configuration:
	  <IfModule mod_authz_core.c>
	    Require all granted
	  </IfModule>
  </Directory>
</VirtualHost>



( run in 0.851 second using v1.01-cache-2.11-cpan-39bf76dae61 )