Commit 5172f870 authored by Stefan Galinski's avatar Stefan Galinski 🎮
Browse files

[TASK] Finally the certificate works

parent a90213b6
......@@ -60,15 +60,15 @@ end
### Setup Virtual Host ###
##########################
# ssl certificate needed (requires that typo3_site (or a kind of) was executed before this script)
web_app node['webgrind']['hostname'] do
server_name node['webgrind']['hostname']
apache node['apache']
docroot node['webgrind']['install_path'] + '/'
end
# ssl certificate needed (requires that typo3_site (or a kind of) was executed before this script)
node.default['webgrind']['base_hostname'] = node['typo3_site']['hostname']
template '/etc/apache2/sites-enabled/webgrind.pia.dev.conf' do
template '/etc/apache2/sites-available/webgrind.pia.dev.conf' do
source 'web_app.conf.erb'
mode '0644'
variables(
......@@ -76,3 +76,7 @@ template '/etc/apache2/sites-enabled/webgrind.pia.dev.conf' do
)
action :create
end
service 'apache2' do
action :restart
end
\ No newline at end of file
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
ServerName <%= @params[:server_name] %>
ServerName <%= @params[:hostname] %>
# Enable HTTP/2
Protocols h2 http/1.1
DocumentRoot <%= @params[:docroot] %>
<Directory <%= @params[:docroot] %>>
DocumentRoot <%= @params[:install_path] %>
<Directory <%= @params[:install_path] %>>
Options FollowSymLinks MultiViews
AllowOverride All
Require all granted
......@@ -19,8 +19,8 @@
#LogLevel info ssl:warn
LogLevel warn
ErrorLog <%= @params[:apache]['log_dir'] %>/<%= @params[:name] %>-error.log
CustomLog <%= @params[:apache]['log_dir'] %>/<%= @params[:name] %>-access.log combined
ErrorLog /var/log/apache2/<%= @params[:hostname] %>-error.log
CustomLog /var/log/apache2/<%= @params[:hostname] %>-access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
......@@ -159,16 +159,16 @@ SSLStaplingCache shmcb:/var/run/ocsp(128000)
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName <%= @params[:server_name] %>
ServerName <%= @params[:hostname] %>
DocumentRoot <%= @params[:docroot] %>
<Directory <%= @params[:docroot] %>>
DocumentRoot <%= @params[:install_path] %>
<Directory <%= @params[:install_path] %>>
Options FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
LogLevel warn
ErrorLog <%= @params[:apache]['log_dir'] %>/<%= @params[:name] %>-error.log
CustomLog <%= @params[:apache]['log_dir'] %>/<%= @params[:name] %>-access.log combined
ErrorLog /var/log/apache2/<%= @params[:hostname] %>-error.log
CustomLog /var/log/apache2/<%= @params[:hostname] %>-access.log combined
</VirtualHost>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment