Plugin Support
qtwrk
(@qtwrk)
Hi,
https://static.miim.com.au/wp-content/litespeed/cssjs/208d5.css?060d2
you need to make static domain works first , and then you can sue CDN function to rewrite the URL automatically without involving all these changed you have done
Best regards,
Thank you @qtwrk
The domain is already working, I am using cloud flare already so I did not
https://static.miim.com.au/
Images do work
https://static.miim.com.au/themes/twentytwenty/assets/images/2020-three-quarters-1.png
But not the JS and CSS
I assume you mean here:
https://nimb.ws/ZRBKuN
LiteSpeed > Cache CDN
Thank you again.
Plugin Support
qtwrk
(@qtwrk)
Hi,
I mean that CDN in your screenshot
for whatever reason , your alter wp-content URL is not working properly.
e.g this is theme’s css file and it is giving 404 error
https://static.miim.com.au/wp-content/themes/twentytwenty/print.css?ver=1.5
you need to make it working properly first.
simplest way :
1. undo whatever you did in your first post
2. go to your control panel (I assume something like cPanel) , create a sub-domain static.domain.com , point it to your public_html
3. set up CF or other additional service , or simply wait for your cPanel issue valid cert for this subdomain
4. go to CDN setting as your screenshot , enable CDN , set CND URL to https://static.domain.com/ , and then in Origin URL set //domain.com/ , purge all
Best regards,
Thank you so much for the detailed information.
I’ma using cyberpanel , I am pretty sure I set up the domain correctly under “add domain”, I ahev teh A record and IP set up in cloudfrlare to work.
These images are OK https://static.miim.com.au/themes/twentytwenty/assets/images/2020-three-quarters-1.png
I’m not sure why the others dont as in css and js from litespeed.
I have static. pointing to public_html/wp-content.
Should it just be “public_html”
Thank you
Plugin Support
qtwrk
(@qtwrk)
Hi,
yes, i see now
https://static.miim.com.au/wp-content/themes/twentytwenty/print.css?ver=1.5
works now
you should keep that document root empty or “public_html” , the thing is you need to set both main domain and sub-domain into same directory.
Best regards,
Plugin Support
qtwrk
(@qtwrk)
Hi,
https://community.cloudflare.com/t/use-cookie-free-domains/107448
you need to disable CF, CF always put a cookie over request
Best regards,
Thank you I have seen this, so do:
https://static.miim.com.au/wp-content/litespeed/cssjs/8ef6e.css?3f1de
Come from CF? Will I have the same issue if I try Qic?
Thank you again for all the knowledge you are sharing.
Plugin Support
qtwrk
(@qtwrk)
Hi,
View post on imgur.com
yes, it is serving through CF.
Yes, I think you will have same issue with QC
Best regards,
Thank you,
Seems like it is not possible without removing the CDN ? Or can I exclude?
Sorry one other issue with static, i the font showing a CORS policy issue console error,
can I fix this in LS dashboard ?
https://nimb.ws/LTKlPX
Access to font at ‘https://static.miim.com.au/wp-content/themes/twentytwenty/assets/fonts/inter/Inter-upright-var.woff2’ from origin ‘https://miim.com.au’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
8ef6e.css:1 GET https://static.miim.com.au/wp-content/themes/twentytwenty/assets/fonts/inter/Inter-upright-var.woff2 net::ERR_FAILED
Plugin Support
qtwrk
(@qtwrk)
Hi,
you need to add CORS header to your static sub-domain if you are using OpenLiteSpeed
Seems like it is not possible without removing the CDN ? Or can I exclude?
disable on your sub domain should work
-
This reply was modified 4 years, 8 months ago by
qtwrk.
Thank you,
Is it:
https://www.litespeedtech.com/support/forum/threads/solved-htaccess-environment-variable-assignment-fails-in-lsws-but-works-in-apache.16382/#post-102554
domain2.com is my static. ?
RewriteCond %{HTTP:Origin} ^http(s)?://(.+\.)?(domain1.com|domain2.com)$
RewriteRule \.(otf|ttf|eot|woff)$ – [E=THE_ORIGIN:%0]
Header set Access-Control-Allow-Origin %{THE_ORIGIN}e env=THE_ORIGIN
Plugin Support
qtwrk
(@qtwrk)
is it OpenLiteSpeed or LiteSpeed Enterprise ?
if it’s enterprise, use your link , if it’s OLS, go with this https://openlitespeed.org/kb/how-to-set-up-custom-headers/
Best regards
It is the free OpenLiteSpeed. I will look at your link thank you.
I am on Cyberpanel and cant see Virtual Hosts. Any ideas?
Can this be done in the htaccess file?