Change the port for IPFS's nginx vhost
This commit is contained in:
parent
6430d71006
commit
2090bc6b10
@ -27,7 +27,8 @@ template "#{node['nginx']['dir']}/sites-available/ipfs.kosmos.org" do
|
|||||||
root_directory: root_directory,
|
root_directory: root_directory,
|
||||||
ssl_cert: "/etc/letsencrypt/live/ipfs.kosmos.org/fullchain.pem",
|
ssl_cert: "/etc/letsencrypt/live/ipfs.kosmos.org/fullchain.pem",
|
||||||
ssl_key: "/etc/letsencrypt/live/ipfs.kosmos.org/privkey.pem",
|
ssl_key: "/etc/letsencrypt/live/ipfs.kosmos.org/privkey.pem",
|
||||||
ipfs_api_port: 5001
|
ipfs_api_port: 5001,
|
||||||
|
ipfs_external_api_port: 5444
|
||||||
|
|
||||||
notifies :reload, 'service[nginx]', :delayed
|
notifies :reload, 'service[nginx]', :delayed
|
||||||
end
|
end
|
||||||
@ -36,6 +37,12 @@ nginx_site 'ipfs.kosmos.org' do
|
|||||||
enable true
|
enable true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
firewall_rule 'ipfs_api' do
|
||||||
|
port 5444
|
||||||
|
protocol :tcp
|
||||||
|
command :allow
|
||||||
|
end
|
||||||
|
|
||||||
# Generate a Let's Encrypt cert (only if the nginx vhost exists and no cert
|
# Generate a Let's Encrypt cert (only if the nginx vhost exists and no cert
|
||||||
# has been generated before. The renew cron will take care of renewing
|
# has been generated before. The renew cron will take care of renewing
|
||||||
execute "letsencrypt cert for ipfs.kosmos.org" do
|
execute "letsencrypt cert for ipfs.kosmos.org" do
|
||||||
|
@ -16,7 +16,7 @@ server {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
|
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
|
||||||
listen 443 ssl spdy;
|
listen <%= @ipfs_external_api_port %> ssl spdy;
|
||||||
<% else -%>
|
<% else -%>
|
||||||
listen 80;
|
listen 80;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user