NethServer Version: 7.3.1611
Module: httpd
I have a similarly problem like @hunv in Too many Redirects when accessing Roundcube
I setup a virtual host “host.domain” to access my server from the internet. I set the “ssl is required checkbox” to true. When I try to connect to my server via https://host.domain a test page is viewed properly but when I connect to https://host.domain/webmail my site is redirected to http://host.domain/webmail. After two or three tries and always putting https in front of the url its working.
when I do curl -L -v -k https://host.domain/webmail from outside my lokal net I get:
/Users/test==> curl -L -v -k https://host.domain/webmail
- Trying xx.xx.xx.xx…
- TCP_NODELAY set
- Connected to host.domain (xx.xx.xx.xx) port 443 (#0)
- TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- Server certificate: host.domain
- Server certificate: Let’s Encrypt Authority X3
- Server certificate: DST Root CA X3
GET /webmail HTTP/1.1
Host: host.domain
User-Agent: curl/7.51.0
Accept: /
< HTTP/1.1 301 Moved Permanently
< Date: Fri, 31 Mar 2017 19:00:28 GMT
< Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.4.16
< Location: http://host.domain/webmail/
< Content-Length: 241
< Content-Type: text/html; charset=iso-8859-1
<
- Ignoring the response-body
- Curl_http_done: called premature == 0
- Connection #0 to host host.domain left intact
- Issue another request to this URL: ‘http://host.domain/webmail/’
- Trying xx.xx.xx.xx…
- TCP_NODELAY set
- Connected to host.domain (xx.xx.xx.xx) port 80 (#1)
GET /webmail/ HTTP/1.1
Host: host.domain
User-Agent: curl/7.51.0
Accept: /
< HTTP/1.1 400 Bad Request
< Date: Fri, 31 Mar 2017 19:00:28 GMT
< Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.4.16
< Strict-Transport-Security: max-age=15552000; includeSubDomains; preload
< Content-Length: 362
< Connection: close
< Content-Type: text/html; charset=iso-8859-1
<
Bad Request
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.
The same is happening with every app like nextcloud, dokuwiki, …
When I issue the curl command from the server itself it´s working.
Any ideas?
Regards,
Joachim