Can't login when htaccess is enabled

Steps to reproduce
1. Install Ubuntu 16.04
2. Install i-mscp
3. Create Domain and user with i-mscp
4. Upload owncloud to web directory

Expected behaviour
When the .htaccess is enabled, I should be able to login into my owncloud. headers and rewrite are enabled

Actual behaviour
I can only login when I rename the htacces file so that it won't be used by the server
Edit: Additional information regarding that odd behaviour: When I hit enter, the browser loads infinitely.

Server configuration
Operating system: Ubuntu 16.04 with i-mscp
Web server: apache2.4.18
Database: 5.7.15
PHP version: 7.0.8-0ubuntu0.16.04.3,
ownCloud version: 9.1.1
Updated from an older ownCloud or fresh install: fresh install
Special configuration: https enabled via let's encrypt, webdav is not installed, installed oC directly into htdocs

Integrity status for oC9+

With renamed .htaccess:

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.
Results
=======
- core
	- FILE_MISSING
		- .htaccess
	- EXTRA_FILE
		- .htaccess.old
Raw output
==========
Array
(
    [core] => Array
        (
            [FILE_MISSING] => Array
                (
                    [.htaccess] => Array
                        (
                            [expected] => ab5f4c44ba2f9c66f2ed25c3ad3d84660b2808cca11ffa8fe2778a648a054d8ada495a0bf4715dc873aac1efe8dfd92a72f9a24441d8f5240834e639325fd892
                            [current] => 
                        )
                )

        [EXTRA_FILE] => Array
            (
                [.htaccess.old] => Array
                    (
                        [expected] => 
                        [current] => 07e8acc59feed3ff43cb921a8be2f30d3c0e803cc24cd2b375e1500181426ac69a952d65db946023bd27755dd228cddac9625616b623d9e131bbdac371db4cca
                    )

            )

    )
)

ownCloud log (data/owncloud.log)

{"reqId":"gAPPIxj9q7iYotEzpkr4","remoteAddr":"(censored)","app":"DeleteOrphanedItems","message":"0 orphaned system tag relations deleted","level":0,"time":"2016-10-15T22:14:06+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"gAPPIxj9q7iYotEzpkr4","remoteAddr":"(censored)","app":"DeleteOrphanedItems","message":"0 orphaned user tag relations deleted","level":0,"time":"2016-10-15T22:14:06+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"gAPPIxj9q7iYotEzpkr4","remoteAddr":"(censored)","app":"DeleteOrphanedItems","message":"0 orphaned comments deleted","level":0,"time":"2016-10-15T22:14:06+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"gAPPIxj9q7iYotEzpkr4","remoteAddr":"(censored)","app":"DeleteOrphanedItems","message":"0 orphaned comment read marks deleted","level":0,"time":"2016-10-15T22:14:06+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"lL40Fix\/cyHaPdbfE95h","remoteAddr":"(censored)","app":"DeleteOrphanedSharesJob","message":"0 orphaned share(s) deleted","level":0,"time":"2016-10-15T22:16:02+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"Zu9F0o+rtOu8MeLlb1cD","remoteAddr":"(censored)","app":"no app in context","message":"Invalidating tokens older than 2016-10-14T20:18:41+00:00","level":1,"time":"2016-10-15T22:18:41+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"LUvAQYyo6GsmIl9xe\/ol","remoteAddr":"(censored)","app":"DeleteOrphanedItems","message":"0 orphaned system tag relations deleted","level":0,"time":"2016-10-16T12:52:31+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"LUvAQYyo6GsmIl9xe\/ol","remoteAddr":"(censored)","app":"DeleteOrphanedItems","message":"0 orphaned user tag relations deleted","level":0,"time":"2016-10-16T12:52:31+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"LUvAQYyo6GsmIl9xe\/ol","remoteAddr":"(censored)","app":"DeleteOrphanedItems","message":"0 orphaned comments deleted","level":0,"time":"2016-10-16T12:52:31+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"LUvAQYyo6GsmIl9xe\/ol","remoteAddr":"(censored)","app":"DeleteOrphanedItems","message":"0 orphaned comment read marks deleted","level":0,"time":"2016-10-16T12:52:31+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"4e34\/hBA9lneoPaomMOc","remoteAddr":"(censored)","app":"DeleteOrphanedSharesJob","message":"0 orphaned share(s) deleted","level":0,"time":"2016-10-16T13:07:50+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"tR6fEnVw4q5I4RvjJdol","remoteAddr":"(censored)","app":"no app in context","message":"Invalidating tokens older than 2016-10-15T11:14:54+00:00","level":1,"time":"2016-10-16T13:14:54+02:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"lzpEzeDMxncvu21Dixhk","remoteAddr":"(censored)","app":"no app in context","message":"CSRF check failed","level":0,"time":"2016-10-16T13:21:37+02:00","method":"POST","url":"\/index.php\/login","user":"--"}

Issues with the webserver are only logged in the webservers access logs, not in the data/owncloud.log

I forgot to mention this, but there are no errors in the apache error log. (The logging is correctly configured.)

Edit: I will look into the acces.log and post it here

Edit:
That's everything that is logged and written into the access.log

(censored) - - [16/Oct/2016:15:11:31 +0200] "GET /index.php HTTP/1.1" 302 - "https://share.(censored).de/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"
(censored) - - [16/Oct/2016:15:11:31 +0200] "GET /index.php/login HTTP/1.1" 200 2071 "https://share.(censored).de/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"
(censored) - - [16/Oct/2016:15:11:31 +0200] "GET /index.php/core/js/oc.js?v=4d2f570281ea7bb30ec5acaa2180da20 HTTP/1.1" 200 2480 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"

I also talked to the i-mscp developers. They assume it's i-mscp fault. They will deliver a fix. I will test it and post the outcome here.

1 Like

It was a bug in i-mscp. They fixed it in the new 1.3.6 release. There were problems with the PHP-FPM handling.

Hello,

I'm the i-MSCP Project director. For further details about the issue, see: https://github.com/i-MSCP/imscp/blob/1.3.x/docs/1.3.x_errata.md#proxy-loop-caused-by-the-proxyerroroverride-directive-apache2--2410

1 Like