...
 
Commits (4)
......@@ -51,12 +51,26 @@ class Command(BaseCommand):
\tProxyPass / {school.internal_host}
\tProxyPassReverse / {school.internal_host}
\tProxyPreserveHost on
</VirtualHost>
"""
def gen_disabled_vhost(self, school):
return f"""<VirtualHost *:443>
\tServerName {school.external_host}
\tServerAdmin webmaster@{school.external_host}
\tDocumentRoot /var/www/fra_disabled
\tInclude /etc/apache2/ssl.conf
</VirtualHost>
"""
def handle(self, *args, **kwargs):
for school in models.Institute.objects.filter(active=True):
for school in models.Institute.objects.filter():
if self.is_valid_fqdn_or_ip(school.external_host) and \
self.is_valid_fqdn_or_ip(school.internal_host):
self.is_valid_fqdn_or_ip(school.internal_host) and \
school.active:
print(self.gen_vhost(school))
else:
print(self.gen_disabled_vhost(school))
......@@ -34,6 +34,10 @@
{% endfor %}
{% block content %}
{% endblock content %}
<br><br>
<div class="alert alert-secondary text-center">
Copyright (&copy;) 2019 Marco Marinello
</div>
</div>
</div>
</body>
......
......@@ -3,16 +3,16 @@
{% block content %}
<div class="row">
<div class="col-lg-7"></div>
<div class="col-lg-3 text-right">
<div class="col-lg-2">
<img src="{% static 'img/logo-FUSS.png' %}" style="max-width: 100%;">
</div>
<div class="col-lg-3">
<h1 style="font-weight: bold; font-size: 55px;">
Remote
<br>
Access
</h1>
</div>
<div class="col-lg-2">
<img src="{% static 'img/logo-FUSS.png' %}" style="max-width: 100%;">
</div>
</div>
<br><br><br>
......