I have installed the new plugin for my wordpress called " Media Cloud" and because my server is a local domain server I have to improvise in order to get that plugin working.
I found some stuff on the web, but as usual they all are working with cPanel
The plugin function is to transfer all the media from /wp-content to external storage like Amazon S3 or other S3 compatible service like wasabi or in my case MINIO
In order to work properly I have to have a CDN URL for serving images and non-image files. If that was a on the web I can just put CloudFront, Fastly or another CDN to do the job, but as I said im my case I have improvise.
Any idea how can I create of what in cPanel called âsubdomainâ in Virtualmin I believe is called sub server and to be pointed to my main domain or something like that in order to for serving as CDN like CloudFront, Fastly or another CDN
In Virtualmin, it is a cname that you should create, going by what you posted.
So if your main website is www.domain.tld and you create a cname called cdn.domain.tld and point the cname to xyz123.cdndomain.tld (or whatever subdomain the CDN service provider has created for you) then it should work for those WordPress plugins that can change the URL of your static resources from www.domain.tld to cdn.domain.tld
Hi, it has been said above by calport - you need to create a cname which will point to your external resource. Or if its a small website, just skip this part. Or if you have a dedicated server with a lot of RAM, use part of the RAM as disk in memory and as CDN.
Assuming youâre using Virtualmin to do your hosting and your DNS:
Letâs say you have a domain called mydomain. You create a sub-server (subdomain) of that domain called cdn.mydomain. That will create the subdomain on your Virtualmin system including all the records you will ever need for it (name, mail, ftp, www, all of them).
Then you can simply go to that subdomain in Virtualmin and amend the records to anything you need them to be under That Subdmain / Server Configuration / DNS Records.
When create a subdomain as you all saying here I got the same result This plugin need something between the wordpress and minio to serve the images and I never done anything like that before and I donât know how to configured properly
Or might be I am going the wrong way. Might be I donât need CDN but what I need is:
Because if I donât enter the CDN in the CDN Settings the plugin still rewrite the URL of the image, but the image shows like this withing the post:
The interesting part is that URL is rewritten with HTTP, because my MINIO does not have HTTPS because then I install TLS to MINIO server I got cURL error 60 because MINIO is using self signed certificate.
I tried to to configure cURL --insecure, Iâve downloaded the *.pem to my Virtualmin server and made this certificate trusted to this server, but still the plugin refused to connect to MINIO for some unknown reasons.
I have tried everything that I know and that I found on the web to make it work
OK, but the whole point of what I am trying to do is to offload my images to minio storage so I can save space on the webserver and my MINIO is direct attached to 12 fast SSDs, that will give my website a lot more speed. I have over 50 000 images and videos, because my webserver is vmware vm I prefer the dedicated storage to vmware to be used for my VMs, thatâs why I want to offload the wordpress media on to the MINIOâs storage.
It seems like youâre talking around the problem (and this is also a reminder of why we do not use the term âsubdomainâ to refer to an account type in Virtualmin, because the way cPanel wrongly uses the term leads to confusion like this).
A subdomain is a name (in cPanel it is a name and some weird pseudo-domain account typeâŠwe donât conflate the two concepts in Virtualmin). Thatâs all it is.
If you want a domain name pointing to some other IP, just create an A record that points to that other IP. That A record can be a subdomain name or any other name you want. It has nothing to do with sub-servers. I donât know why it would have anything to do with subdomains in cPanel, either.
when I create a subdomain A record pointed to my MINIO IP
The plugin rewrite the URL and when I open the URL I am getting this
BadRequestAn error occurred when parsing the HTTP request GET at â//sites/2/sites/2/2021/11/beets-vector-1.jpgâ//sites/2/sites/2/2021/11/beets-vector-1.jpgneptuned954c3e2-6d12-4bbe-8a8f-2b1a54d41ae1
Where is your website server and where is your MINIO space. Lets forget the panels for a moment. As your CDN is external to your website, you need to configure and possibly open firewall ports and addresses. Your MNIO setup wont accept any connection by default? Your Virtualmin server needs to open/access Minio IP and port.
I donât need CDN I figured out, but I need to configure MINIO to use TLS and then get rid of the cURL error 60
Now How I figured out!!! I have no idea, but I did something that clear some cache or some other stuff.
First I took a snapshot of my webserver VM on the vmware as always if I do something wrong I can revert to its previous state. Then I edit the virtual server and unchecked âApache SSL website enabledâ
Then I tried to access the admin of the wordpress with âhttpâ and for some reason it kept redirecting me to âhttpsâ I donât know why, but I reverted the VM from Vmware to its previus state and now when I upload I can see the image with its cloud icon on the right bottom corner as it should be
but if I open it with HTTP I have no problem the image is loading. Now what I need to do is setup MINIO with TLS, but the problem is the plugin cannot connect to MINIO with âHTTPSâ because it gets cURL Error 60 because of the Self Signed Certificate
CURLE_PEER_FAILED_VERIFICATION (60)
The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK. This error code has been unified with CURLE_SSL_CACERT since 7.62.0. Its previous value was 51.
I can use -k --insecure to bypass curl, but is there a way to make my webserver trust the self signed certificate of my minio server
In the past I have had to import the certificate .pem and .key file to the server for a service I used (not minio). Its app specific and process depends on the service. Some will use own portals whilst others require you to manually copy across. Probably best to ask within the minio community of people who have done this themselves with the self generated certificate.