Hey!
Currently having the task to migrate Kirby from on-prem to Azure Web Service.
So far so good!
After launching the starter kit as a first test i am facing the first issues
After changing a few settings i kind of got the website to load.
But(!): Only the html part loads and not the css scripts as https is required.
I cant load the css because of the https.
Any ideas to fix this issue ?
Error message (cant post second picture because im a new user):
Mixed Content: The page at 'https://***.azurewebsites.net/' was loaded over HTTPS, but requested an insecure script 'http://example.com:8080/assets/js/prism.js'. This request has been blocked; the content must be served over HTTPS.
The same error is thrown with the css scripts
Changing āHTTPS Requiredā setting to āfalseā doesent solve the issue for me. Thank you!
did you replace that part in the error with this or does the error literally say requested an insecure script 'http://example.com:8080/assets/js/prism.js'?
Out of curiosity Iāve just created a free Azure PHP App Service following the Quickstart guideā¦ And the problem seems to be that it automatically sets these variables:
Kirby relies on those to generate any absolute URL. example.com and port 8080 are both, obviously, wrong.
I donāt know how one could correct these.
There have been recent changes (like literally in the latest 3.7.1 version that was released a few days ago) to how proxy servers are detected by kirby. So I donāt reliably know what the best way forward would be. Maybe @lukasbestle knows more details.
Something you could do (and someone more versed with Azure App Services should check this) would be giving Kirby explicitly the exact server name and protocol, by adapting your index.php from the starterkit to this:
Actuallyā¦ It seems like the PHP quicktstart thing from azure runs on nginx. Therefore the standard .htaccess file is ignored and one must find a way to configure nginx to rewrite the requests like apache with mod_rewrite would do.
Hereās a guide on how to configure nginx: Running Kirby on a Nginx web server | Kirby CMS - but I donāt know how one would reach the config file from the azure platform
You can reach the config file via ssh (scrolling down on the left side)
I am absolutly not familiar with this, but i am goint to try! If i have success i am going to post here! @Rasteiner! Thanks for your support if you have any additional info please let me know
On the other hand the shell warns you that everything outside of /home is not persisted (I guess that is the only folder that is mounted into the docker container). So, I donāt know how you would load a config, since that would require restarting nginx, which would stop the container, which would discard your changes to the config