There are some warnings regarding your setup.The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation.The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.Your web server is not properly set up to resolve "/.well-known/webfinger". Further information can be found in the documentation.Your web server is not properly set up to resolve "/.well-known/nodeinfo". Further information can be found in the documentation.Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation.Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the documentation.
redir /.well-known/caldav /remote.php/dav 301redir /.well-known/carddav /remote.php/dav 301php_fastcgi 127.0.0.1:9000header {Strict-Transport_security max-age=31536000;Host $host;X-Real-IP $remote_addrX-Forwarded-For $proxy_add_x_forwarded_for;X-Forwarded-Proto $scheme;}
I recently moved from using caddy2 as the reverseproxy to using HAProxy plugin on opnsense. The reverse proxying part is working fine. But when I get to the Settings page in Nextcloud, I am seeing the following warnings:Code: [Select]There are some warnings regarding your setup.The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation.The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips .Your web server is not properly set up to resolve "/.well-known/webfinger". Further information can be found in the documentation.Your web server is not properly set up to resolve "/.well-known/nodeinfo". Further information can be found in the documentation.Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation.Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the documentation.When using caddy2, I didn't have any warnings/errors on the Nextcloud settings page. In my caddy2 setup I had the following configuration for nextcloud apart from the actual proxying:Code: [Select]redir /.well-known/caldav /remote.php/dav 301redir /.well-known/carddav /remote.php/dav 301php_fastcgi 127.0.0.1:9000header {Strict-Transport_security max-age=31536000;Host $host;X-Real-IP $remote_addrX-Forwarded-For $proxy_add_x_forwarded_for;X-Forwarded-Proto $scheme;}I checked Nextcloud documentation regarding HAProxy as the reverse-proxy and it describes what needs to be added but where would I add these in the Opnsense HAProxy plugin settings?Thanks.
There are some warnings regarding your setup.The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation.The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips .Your web server is not properly set up to resolve "/.well-known/webfinger". Further information can be found in the documentation.Your web server is not properly set up to resolve "/.well-known/nodeinfo". Further information can be found in the documentation.Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation.Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the documentation.
What options do you have to add ?
Quote from: lfirewall1243 on April 13, 2021, 09:55:08 pmWhat options do you have to add ?The ones that would help me fix the warnings in Nextcloud. I assume they would be similar to the ones I had setup in caddy2. like the X-Real-IP, Strict Transport, X-Forwarded-For etc. I just am not sure how or where to add them in the HAProxy plugin in opnsense.Would I have to create a new condition? Which condition type should I choose to add the headers? I guess the redirects need to be enabled via Rules?
I think you'll have to add them in the Frontend options.Maybe its enough to enable "Enable-X-Forwarded-For-Header"
code 301 location /index.php%[capture.req.uri]
Hello,sorry for bringing this post back to life, but I have the same issue. I have followed this suggestion, but I still have the same issue.Are there any known alternatives, or maybe could you describe if you had to change any config files in the nextcloud server itself? (shouldn't be needed, since it's going over reverse proxy, same as mine)Thank you.Kosta