• Resolved hans410947

    (@hans410947)


    Hello,

    I wish to have my Development/Staging site connected to Quic Cloud CDN, and I will use this method: https://docs.quic.cloud/cdn/devsite/

    I also want to be the only person who can access this Staging site, as it is an exact copy of my Live site.

    Can I use this https://docs.quic.cloud/cdn/security/#access-control to add my own IP address to the allowlist, and then use the blocklist to prevent everyone else from accessing the staging site?
    How can I make the blocklist block all other IP:s? Can I use wildcard like this:

    *.*.*.*

    Or is there a better way to block access to my staging site for all but myself?

    Thank you!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support qtwrk

    (@qtwrk)

    no , that won’t work , the QC IPs are auto-added in allow list

    assuming you have correctly set up the use client ip in header

    use rewrite rule to block all other IPs except yours , e.g.

    RewriteCond %{REMOTE_ADDR} !123\.123\.123\.123
    RewriteRule .* - [F,L]

    so in above rule , assuming your IP is 123.123.123.123, then every other IP’s request will be denied

    Thread Starter hans410947

    (@hans410947)

    Hello and thank you for your response!

    -How do I correctly set up the use client ip in header ?

    -Should I put the rewrite rule at the top of the .htaccess file?

    Thank you!

    • This reply was modified 2 months, 3 weeks ago by hans410947.
    Plugin Support qtwrk

    (@qtwrk)

    this option: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:config:show-real-ip-behind-cloudflare , need to set to trusted ip only

    and yes, put it at top of htaccess

    Thread Starter hans410947

    (@hans410947)

    Hello and thank you for your reply.

    The link you posted takes me to LiteSpeed WebServer.

    Maybe I misunderstand something, but I am using the LiteSpeed WordPress plugin together with Quic Cloud cloud services and CDN.

    I have followed this doc to connect my staging site to Quic Cloud: https://docs.quic.cloud/cdn/devsite/ I added an A-record for the dev-site in the DNS zone at Quic Cloud.

    I have also regenerated the Domain key in Litespeed plugin, and then connected to QC, so that I now have 2 domains in Quic Cloud: the main domain and the staging site.

    But I can not find the table that is in your link anywhere, so I don′t know how to access “use client ip in header”

    Plugin Support qtwrk

    (@qtwrk)

    are you running on shared hosting or your own server ?

    Thread Starter hans410947

    (@hans410947)

    I am on shared hosting.

    I have a WordPress Woocommerce site on a shared hosting, I am using the Litespeed cache plugin on the site, and I have connected the site to Quic Cloud using Domain key and CDN auto setup.

    • This reply was modified 2 months, 3 weeks ago by hans410947.
    Plugin Support qtwrk

    (@qtwrk)

    then you probably not need to do that step that your provider should have already done it

    Thread Starter hans410947

    (@hans410947)

    You mean I dont need to do the step “correctly set up the?use client ip in header“?

    So i I should just go ahead and add the rewrite rule in .htaccess?

    Plugin Support qtwrk

    (@qtwrk)

    yes, no need to that use client ip header thign , and place the rue in htaccess make sure you update the IP to your own IP instead of my example IP

    Thread Starter hans410947

    (@hans410947)

    Thank you very much, it is working now!

    The Crawler can not find the sitemap after adding the rewrite rule. Does the crawler have it′s own IP address that I can add to the code to allowlist it?

    Plugin Support qtwrk

    (@qtwrk)

    yes, the crawler will probably use the server’s public IP , you may need to add that into the rule as well.

    Thread Starter hans410947

    (@hans410947)

    Perfect, that worked, thank you very much!

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.