diff --git a/examples/irida.yaml b/examples/irida.yaml index 2fcbf91..faf5393 100644 --- a/examples/irida.yaml +++ b/examples/irida.yaml @@ -8,6 +8,7 @@ irida::tomcat_group: 'grp_tomcat' irida::manage_user: true irida::java_heap_memory: 2048 irida::irida_ip_addr: irida.ca +irida::server_base_url: 'irida.ca' irida::make_db: true irida::db_user: irida irida::db_password: REALLYstrongPASSWORDsoGOOD!!!!1! diff --git a/manifests/init.pp b/manifests/init.pp index 309cec1..92a01e5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -8,6 +8,7 @@ String $tomcat_logs_location = "${tomcat_location}/logs", Integer $java_heap_memory = 1024, String $irida_ip_addr = 'localhost', + String $server_base_url = 'localhost', String $irida_version = '20.01.2', #release tags https://github.com/phac-nml/irida/releases String $irida_url_path = 'irida', String $linker_script = 'ngsArchiveLinker.pl', diff --git a/templates/web.conf.erb b/templates/web.conf.erb index e916216..7a96b6b 100644 --- a/templates/web.conf.erb +++ b/templates/web.conf.erb @@ -1,10 +1,10 @@ # The externally visible URL for accessing this instance of IRIDA. This key is # used by the e-mailer when sending out e-mail notifications (password resets, # for example) and embeds this URL directly in the body of the e-mail. -<% if @use_ssl %> -server.base.url=https://<%= @irida_ip_addr %>/<%= @irida_url_path %> +<% if @use_ssl && @force_ssl %> +server.base.url=https://<%= @server_base_url %>/<%= @irida_url_path %> <% else %> -server.base.url=http://<%= @irida_ip_addr %>/<%= @irida_url_path %> +server.base.url=http://<%= @server_base_url %>/<%= @irida_url_path %> <% end %> # Mail server configuration settings