Hi everyone,
Can someone help me find the file where I can specify the full domain path (https)?
The problem is that CSS styles are not loading when accessing the site via the domain name (https), but everything works fine when using the IP address.
I need to find the file where I can set this up on an already installed Silverstripe site.
As Tim has mentioned, some information about the way your hosting setup will be useful here. I assume the piece of information you’ve redacted in the screenshots is the server name.
If that’s the case, perhaps you have a reverse proxy set up, and the host header being passed through from the proxy doesn’t match the host you’re actually using in your browser.
I recommend using a debugger like xdebug and stepping through the Director::host() method and see how it’s coming to the conclusion it’s coming to, as that may clue you into what’s going wrong and hopefully how to resolve it.
Be careful: the above code has a space after .ru and before the slash.
Apart from that, what you did means Director::baseURL() returned a wrong URL (most likely with http instead of https). You must fix the root cause, do not hide the problem by manually setting the proper base tag.
For some reason, the SS_BASE_URL in your .env seems to not be picked up. Are you sure that environment file is the one deployed? Is there some cache that needs to be refreshed? E.g. if you are using php-fpm, try to restart the service.
Not sure this is relevant, but that public URL returns SSL_ERROR_BAD_CERT_DOMAIN (the certificate is valid for different names).