ich habe ein frisch installiertes Debian 9.5 mit Apache2 und Lets Encrypt eingerichtet, Standardseite auf https://projekte.example.org funktioniert. Danach installierte ich OpenProject, welches unter der Adresse
http://127.0.0.1:6000/openproject/
erreichbar ist (überprüft mit elinks von localhost). Nun soll das ganze per ProxyPass eingerichtet werden, also so, dass ich über die URL:
https://projekte.example.org/openproject/
Auf obige Seite von OpenProject weitergeleitet werde (liegt alles auf dem selben Rechner). Ohne httpS klappt es, mit nicht:
Not Found
The requested URL /openproject/ was not found on this server.
Folgende Konfiguration:
Code: Alles auswählen
Include /etc/openproject/addons/apache2/includes/server/*.conf
<VirtualHost *:80>
ServerName projekte.example.org
DocumentRoot /opt/openproject/public
ProxyRequests off
Include /etc/openproject/addons/apache2/includes/vhost/*.conf
# Can't use Location block since it would overshadow all the other proxypass directives on CentOS
ProxyPass /openproject/ http://127.0.0.1:6000/openproject/ retry=0
ProxyPassReverse /openproject/ http://127.0.0.1:6000/openproject/
</VirtualHost>
<VirtualHost *:443>
ServerName projekte.example.org
#ServerAlias <www.domain.tld>
SSLProxyEngine On
# Analog zu oben
ProxyPass /openproject https://127.0.0.1:6000/openproject/
# Analog zu oben
ProxyPassReverse /openproject https://127.0.0.1:6000/openproject/
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/projekte.example.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/projekte.example.org/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/projekte.example.org/cert.pem
</VirtualHost>
Das blöde ist, es gibt keinen Error. Wenn ich mit tailf die access.log mitlese kommt nur die normale Access-Meldung von meinem Zugriff.
In der error.log kommt gar nichts. Habe deswegen das LogLevel erhöht und folgendes in die beiden VirtualHost-Blöcke eingefügt:
ErrorLog ${APACHE_LOG_DIR}/openproject.log
LogLevel debug
Folgende Log kommt nach einem Restart vom Apache2:
Code: Alles auswählen
[Tue Aug 14 12:14:03.432984 2018] [ssl:info] [pid 1700:tid 140714080847040] AH01914: Configuring server projekte.example.org:443 for SSL protocol
[Tue Aug 14 12:14:03.433231 2018] [ssl:debug] [pid 1700:tid 140714080847040] ssl_engine_init.c(952): AH01904: Configuring server certificate chain (1 CA certificate)
[Tue Aug 14 12:14:03.433248 2018] [ssl:debug] [pid 1700:tid 140714080847040] ssl_engine_init.c(413): AH01893: Configuring TLS extension handling
[Tue Aug 14 12:14:03.433456 2018] [ssl:debug] [pid 1700:tid 140714080847040] ssl_util_ssl.c(443): AH02412: [projekte.example.org:443] Cert matches for name 'projekte.example.org' [subject: CN=projekte.example.org / issuer: CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US / serial: 03ACE1D980284BF86DF4012999F04C9198F6 / notbefore: Jul 24 04:37:42 2018 GMT / notafter: Oct 22 04:37:42 2018 GMT]
[Tue Aug 14 12:14:03.433472 2018] [ssl:info] [pid 1700:tid 140714080847040] AH02568: Certificate and private key projekte.example.org:443:0 configured from /etc/letsencrypt/live/projekte.example.org/fullchain.pem and /etc/letsencrypt/live/projekte.example.org/privkey.pem
[Tue Aug 14 12:14:03.475060 2018] [ssl:info] [pid 1702:tid 140714080847040] AH01914: Configuring server projekte.example.org:443 for SSL protocol
[Tue Aug 14 12:14:03.475320 2018] [ssl:debug] [pid 1702:tid 140714080847040] ssl_engine_init.c(952): AH01904: Configuring server certificate chain (1 CA certificate)
[Tue Aug 14 12:14:03.475337 2018] [ssl:debug] [pid 1702:tid 140714080847040] ssl_engine_init.c(413): AH01893: Configuring TLS extension handling
[Tue Aug 14 12:14:03.475582 2018] [ssl:debug] [pid 1702:tid 140714080847040] ssl_util_ssl.c(443): AH02412: [projekte.example.org:443] Cert matches for name 'projekte.example.org' [subject: CN=projekte.example.org / issuer: CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US / serial: 03ACE1D980284BF86DF4012999F04C9198F6 / notbefore: Jul 24 04:37:42 2018 GMT / notafter: Oct 22 04:37:42 2018 GMT]
[Tue Aug 14 12:14:03.475599 2018] [ssl:info] [pid 1702:tid 140714080847040] AH02568: Certificate and private key projekte.example.org:443:0 configured from /etc/letsencrypt/live/projekte.example.org/fullchain.pem and /etc/letsencrypt/live/projekte.example.org/privkey.pem
[Tue Aug 14 12:14:03.480760 2018] [proxy:debug] [pid 1704:tid 140714080847040] proxy_util.c(1779): AH00925: initializing worker https://127.0.0.1:6000/openproject/ shared
[Tue Aug 14 12:14:03.480793 2018] [proxy:debug] [pid 1704:tid 140714080847040] proxy_util.c(1821): AH00927: initializing worker https://127.0.0.1:6000/openproject/ local
[Tue Aug 14 12:14:03.480814 2018] [proxy:debug] [pid 1704:tid 140714080847040] proxy_util.c(1856): AH00930: initialized pool in child 1704 for (127.0.0.1) min=0 max=25 smax=25
[Tue Aug 14 12:14:03.480827 2018] [proxy:debug] [pid 1704:tid 140714080847040] proxy_util.c(1779): AH00925: initializing worker http://127.0.0.1:6000/openproject/ shared
[Tue Aug 14 12:14:03.480839 2018] [proxy:debug] [pid 1704:tid 140714080847040] proxy_util.c(1821): AH00927: initializing worker http://127.0.0.1:6000/openproject/ local
[Tue Aug 14 12:14:03.480853 2018] [proxy:debug] [pid 1704:tid 140714080847040] proxy_util.c(1856): AH00930: initialized pool in child 1704 for (127.0.0.1) min=0 max=25 smax=25
[Tue Aug 14 12:14:03.481498 2018] [proxy:debug] [pid 1705:tid 140714080847040] proxy_util.c(1779): AH00925: initializing worker https://127.0.0.1:6000/openproject/ shared
[Tue Aug 14 12:14:03.481517 2018] [proxy:debug] [pid 1705:tid 140714080847040] proxy_util.c(1821): AH00927: initializing worker https://127.0.0.1:6000/openproject/ local
[Tue Aug 14 12:14:03.481531 2018] [proxy:debug] [pid 1705:tid 140714080847040] proxy_util.c(1856): AH00930: initialized pool in child 1705 for (127.0.0.1) min=0 max=25 smax=25
[Tue Aug 14 12:14:03.481542 2018] [proxy:debug] [pid 1705:tid 140714080847040] proxy_util.c(1779): AH00925: initializing worker http://127.0.0.1:6000/openproject/ shared
[Tue Aug 14 12:14:03.481564 2018] [proxy:debug] [pid 1705:tid 140714080847040] proxy_util.c(1821): AH00927: initializing worker http://127.0.0.1:6000/openproject/ local
[Tue Aug 14 12:14:03.481580 2018] [proxy:debug] [pid 1705:tid 140714080847040] proxy_util.c(1856): AH00930: initialized pool in child 1705 for (127.0.0.1) min=0 max=25 smax=25
Jemand eine Idee? Ich bin mit meinem Latein ziemlich am Ende ...
Hier die Config-Dateien:
In /etc/openproject/addons/apache2/includes/vhost/00_prefix_redirect.conf steht:
Code: Alles auswählen
# Make sure to redirect /prefix to /prefix/
RewriteEngine On
RewriteRule ^/openproject$ /openproject/ [R,L]
Code: Alles auswählen
Alias /openproject/assets /opt/openproject/public/assets
Alias /openproject/uploads /opt/openproject/public/uploads
<Directory "/opt/openproject/public">
Options -Indexes
<IfModule mod_authz_core.c>
# apache 2.4+
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Allow from all
</IfModule>
</Directory>
ProxyPass /openproject/assets/ !
<Location /openproject/assets/>
ExpiresActive On ExpiresDefault "access plus 1 year"
</Location>
Code: Alles auswählen
# Enabling compression for common text formats
AddOutputFilterByType DEFLATE text/html text/css application/x-javascript application/javascript
Code: Alles auswählen
# Send expiry headers for assets, that carry an asset id. Assuming, an asset
# id is a unix timestamp, which is currently a 10 digit integer. This might
# change in the far future.
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
ExpiresActive On
ExpiresDefault "access plus 1 year"
</FilesMatch>
Code: Alles auswählen
<LocationMatch "^/openproject/sys">
<IfModule mod_authz_core.c>
Require local
</IfModule>
<IfModule !mod_authz_core.c>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</IfModule>
</LocationMatch>