File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,13 +25,14 @@ RUN curl -sSL -o /tmp/simplesamlphp.tar.gz https://github.com/simplesamlphp/simp
2525COPY config/simplesamlphp/config.php /var/www/simplesamlphp/config
2626COPY config/simplesamlphp/authsources.php /var/www/simplesamlphp/config
2727COPY config/simplesamlphp/saml20-sp-remote.php /var/www/simplesamlphp/metadata
28- COPY config/simplesamlphp/server.crt /var/www/simplesamlphp /cert/
29- COPY config/simplesamlphp/server.pem /var/www/simplesamlphp/cert/
28+ COPY config/simplesamlphp/server.crt /etc/ssl/private /cert.crt
29+ COPY config/simplesamlphp/server.pem /etc/ssl/private/private.key
3030
3131RUN echo "<?php" > /var/www/simplesamlphp/metadata/shib13-sp-remote.php
3232
3333# Apache
3434ENV HTTP_PORT 8080
35+ ENV HTTPS_PORT 8443
3536
3637COPY config/apache/ports.conf.mo /tmp
3738COPY config/apache/simplesamlphp.conf.mo /tmp
@@ -40,7 +41,7 @@ RUN /tmp/mo /tmp/ports.conf.mo > /etc/apache2/ports.conf && \
4041
4142# hadolint ignore=DL3059
4243RUN a2dissite 000-default.conf default-ssl.conf && \
43- a2enmod rewrite && \
44+ a2enmod rewrite ssl && \
4445 a2ensite simplesamlphp.conf
4546
4647# Clean up
@@ -51,4 +52,4 @@ RUN rm -rf /tmp/*
5152WORKDIR /var/www/simplesamlphp
5253
5354# General setup
54- EXPOSE ${HTTP_PORT}
55+ EXPOSE ${HTTP_PORT} ${HTTPS_PORT}
Original file line number Diff line number Diff line change 11Listen {{HTTP_PORT}}
2+
3+ < IfModule ssl_module>
4+ Listen {{HTTPS_PORT}}
5+ < / IfModule>
6+
7+ < IfModule mod_gnutls.c>
8+ Listen {{HTTPS_PORT}}
9+ < / IfModule>
Original file line number Diff line number Diff line change 1616 </ IfModule >
1717 </ Directory >
1818</ VirtualHost >
19+ < VirtualHost * :{{HTTPS_PORT }}>
20+ ServerName localhost
21+ DocumentRoot / var / www/ simplesamlphp
22+ SSLEngine on
23+ SSLCertificateFile / etc/ ssl/ private / cert. crt
24+ SSLCertificateKeyFile / etc/ ssl/ private / private . key
25+ Alias / simplesaml / var / www/ simplesamlphp/ www
26+
27+ < Directory / var / www/ simplesamlphp>
28+ RewriteEngine On
29+ RewriteBase /
30+ RewriteRule ^ $ www [L ]
31+ RewriteRule ^/ (.+ )$ www/ $1 [L ]
32+ </ Directory >
33+
34+ < Directory / var / www/ simplesamlphp/ www>
35+ < IfModule ! mod_authz_core. c>
36+ Require all granted
37+ </ IfModule >
38+ </ Directory >
39+ </ VirtualHost >
1940
2041ServerName localhost
You can’t perform that action at this time.
0 commit comments