class Nginx::Configuration
Attributes
dhparam[RW]
root[RW]
Public Class Methods
new(root = nil)
click to toggle source
# File lib/shared_infrastructure/nginx/nginx.rb, line 15 def initialize(root = nil) @dhparam = 2048 @root = root end
Public Instance Methods
certbot_domain_names(domain_name)
click to toggle source
# File lib/shared_infrastructure/nginx/nginx.rb, line 7 def certbot_domain_names(domain_name) "#{domain_name} www.#{domain_name}" end
certificate_directory(domain_name)
click to toggle source
# File lib/shared_infrastructure/nginx/nginx.rb, line 11 def certificate_directory(domain_name) "#{root}/etc/letsencrypt/live/#{domain_name}" end
enabled_server_block_location(domain_name)
click to toggle source
# File lib/shared_infrastructure/nginx/nginx.rb, line 32 def enabled_server_block_location(domain_name) "#{root}/etc/nginx/sites-enabled/#{domain_name}" end
root?()
click to toggle source
# File lib/shared_infrastructure/nginx/nginx.rb, line 20 def root? !(root.nil? || root.empty?) end
root_directory(domain_name)
click to toggle source
# File lib/shared_infrastructure/nginx/nginx.rb, line 24 def root_directory(domain_name) "#{root}/var/www/#{domain_name}/html" end
server_block_location(domain_name)
click to toggle source
# File lib/shared_infrastructure/nginx/nginx.rb, line 28 def server_block_location(domain_name) "#{root}/etc/nginx/sites-available/#{domain_name}" end