Local server/cache of my own public domain to save bandwidth from my lan?

i have public domain and link to cloudflare (i make a local webserver and put it online using cloudflared), i installed wordpress and it load using https since it connect to cloudflare rather than direct from lan, i want to connect directly (not through cloudflare) if i access it from LAN to save internet bandwidth while still use https, how to acomplish that ?

Are you running Openwrt ?

3 Likes
  • Use the LAN IP in your browser - ignore the certificate warning

If using OpenWrt:

  • Make a local DNS entry for the FQDN of the HTTPS server
# in /etc/config/dhcp

config domain
        option ip '192.168.1.xxx'
        option name 'fqdn.example.com'

Hosts using the OpenWrt as their DNS resolver will be able to access the site via the domain name.

1 Like

Yes, the wordpress is hosted on openwrt running on a tv box

i ended up using a self signed certificate, and do create static hostname like your direction via GUI http://<openwrt>/cgi-bin/luci/admin/network/dhcp, surprisingly it doesn't conflict with cloudflared, and when i open the wordpress from other network, it still uses the public certificate from cloudflare

also for security reason, i redirect domain.com/wp-admin and domain.com/wp-login to / in cloudflare, which makes me only able to login to wordpress only from local network

I just noticed that google's search console detect an error about harmful page, i guess it caused by self-signed certificate ? Any suggestion ?
my wordpress plugins only nginx-helper and cloudflare, and the content is just default wordpress page since i just started.

The information you're providing is not clear - and I'm starting to think this relates to other threads you're making.

To remove a self-signed warning on a public HTTPS site, you'll need a recognized Public Certificate installed. Depending on the CA you're using, they may allow you to submit a locally generated CSR for this process. This is the normal setup of a web server - unless I'm misunderstanding, I'm not sure how this is OpenWrt-related specifically.

I'm not sure how properly configuring your web server is directly related to OpenWrt?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.