@girish Yep, that was it, thank you! That's something I should've caught but my mind wasn't sure where to start looking for the problem.
Huge time saver!
@girish Yep, that was it, thank you! That's something I should've caught but my mind wasn't sure where to start looking for the problem.
Huge time saver!
A Wordpress blog I host for someone else went down a few weeks ago and I'm only now able to look at what went wrong. I haven't changed anything and I believe this may have to do with the package auto-updating.
When Wordpress tries to boot up, it gets stuck trying to rewrite table names with commands like:
May 05 11:05:16 ==> Migrating database tables to have a prefix
May 05 11:05:16 ==> Renaming using RENAME TABLE `wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_actions` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_actions`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_claims` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_claims`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_groups` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_groups`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_logs` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_logs`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_commentmeta` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_commentmeta`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_comments` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_comments`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_csp3_subscribers` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_csp3_subscribers`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_layerslider` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_layerslider`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_links` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_links`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_mc4wp_log` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_mc4wp_log`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_new_royalsliders` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_new_royalsliders`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_nxs_log` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_nxs_log`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_nxs_query` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_nxs_query`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_options` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_options`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_postmeta` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_postmeta`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_posts` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_posts`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_term_relationships` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_term_relationships`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_term_taxonomy` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_term_taxonomy`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_termmeta` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_termmeta`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_terms` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_terms`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_usermeta` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_usermeta`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_users` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_users`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_PO_plugins` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_PO_plugins`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_commentmeta` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_commentmeta`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_comments` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_comments`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_csp3_subscribers` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_csp3_subscribers`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_layerslider` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_layerslider`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_links` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_links`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_mc4wp_log` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_mc4wp_log`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_new_royalsliders` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_new_royalsliders`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_nxs_log` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_nxs_log`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_nxs_query` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_nxs_query`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_postmeta` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_postmeta`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_posts` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_posts`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_term_relationships` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_term_relationships`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_term_taxonomy` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_term_taxonomy`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_termmeta` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_termmeta`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_terms` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_terms`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_usermeta` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_usermeta`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_users` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_users`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_indexable` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_indexable`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_indexable_hierarchy` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_indexable_hierarchy`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_migrations` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_migrations`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_primary_term` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_primary_term`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_seo_links` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_seo_links`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_seo_meta` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_seo_meta`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_indexable` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_indexable`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_indexable_hierarchy` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_indexable_hierarchy`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_migrations` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_migrations`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_primary_term` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_primary_term`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_seo_links` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_seo_links`,`wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_seo_meta` TO `wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_seo_meta`
May 05 11:05:16 ERROR 1059 (42000) at line 1: Identifier name 'wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_indexable_hierarchy' is too long
So then I looked and all the tables seem to have been redundantly prepended with wp_
SHOW TABLES;
results in:
| wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_actions |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_claims |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_groups |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_actionscheduler_logs |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_commentmeta |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_comments |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_csp3_subscribers |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_layerslider |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_links |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_mc4wp_log |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_new_royalsliders |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_nxs_log |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_nxs_query |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_options |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_postmeta |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_posts |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_term_relationships |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_term_taxonomy |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_termmeta |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_terms |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_usermeta |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_users |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_PO_plugins |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_commentmeta |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_comments |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_csp3_subscribers |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_layerslider |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_links |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_mc4wp_log |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_new_royalsliders |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_nxs_log |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_nxs_query |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_postmeta |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_posts |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_term_relationships |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_term_taxonomy |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_termmeta |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_terms |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_usermeta |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_users |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_indexable |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_indexable_hierarchy |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_migrations |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_primary_term |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_seo_links |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_wp_j63x3r_yoast_seo_meta |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_indexable |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_indexable_hierarchy |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_migrations |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_primary_term |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_seo_links |
| wp_wp_wp_wp_wp_wp_wp_wp_wp_yoast_seo_meta |
+----------------------------------------------------------------+
I've been working with Wordpress for a long time, but this is new to me. Any ideas if this could be due to the migration script of a package upgrade?
Again, it's been this way for a while, so maybe an update from around 4/7 - 4/10?
Hey there, I have an unorthodox setup for Ghost and Surfer that may be causing problems.
The current issue is that users cannot signup for Ghost membership via the usual request in the Ghost frontend:
members/api/send-magic-link/
My blog is at
If you want to see for yourself.
This problem may come from Cloudflare since I'm using a worker to re-write requests:
// Config for our subdomain (where the Ghost blog currently lives)
// and our root domain (where we want it to live)
// and our blogPath (the subdirectory we want it at)
// Change these to suit your case!
const config = {
subdomain: "blog.re-public.io",
root: "re-public.io",
blogPath: "blog",
}
// Function that processes requests to the URL the worker is at
async function handleRequest(request) {
// Grab the request URL's pathname, we'll use it later
const url = new URL(request.url)
const targetPath = url.pathname
console.log(`https://${config.subdomain}${targetPath}`)
// Change request URLs to go through to the subdomain
let response = await fetch(`https://${config.subdomain}${targetPath}`)
// Ghost loads assets like JS and CSS from 3 subdirectories
// We don't need to change these requests at all
// So if we're getting stuff from those subdirectories,
// we return the response of the fetch request from above
// immediately.
if (
targetPath.includes('/${config.blogPath}/sitemap.xsl') ||
targetPath.includes(`/${config.blogPath}/assets/`) ||
targetPath.includes(`/${config.blogPath}/public/`) ||
targetPath.includes(`/${config.blogPath}/content/`)
) {
console.log(targetPath)
return response
}
// In other cases - which will usually be pages of the
// Ghost blog - we want to find any reference to our subdomain
// and replace it with our root domain.
// This is so that things like our canonical URLs and links are
// set up correctly, so we NEVER see our subdirectory in the code.
// First we get the body of the response from above
let body = await response.text()
// Then we search in the body to replace the subdomain everywhere
// with the root domain.
body = body.split(config.subdomain).join(config.root)
response = new Response(body, response)
return response
}
addEventListener("fetch", (event) => {
event.respondWith(handleRequest(event.request))
})
Why would I do this? Well I am serving a Surfer static site from Cloudron at
And I don't want to fork off the blog to a subdomain for SEO purposes, which members helped me solve in a previous issue, via this Cloudflare solution:
https://forum.cloudron.io/topic/6713/where-can-i-put-custom-nginx-conf-that-won-t-be-overwritten
There are no errors in the Ghost logs in the Cloudron package instance, it just logs a 404 when members/api/send-magic-link/
is hit.
I'm not sure if this is a Cloudflare, Ghost, or Cloudron issue, or a combination of all three. I would really appreciate any guidance on how to debug or suggestions on a fix.
Thank you!
@robi Yes, sorry, I just followed the tutorial that was previously posted by @scooke
https://cloak.ist/blog/how-to-put-a-ghost-blog-at-a-subdirectory-using-cloudflare-workers/
@girish I ended up going with a Cloudflare script, which feels a little cleaner for now. I'll try this when I revisit the issue. Thanks for all your help!
@scooke Yes! Thank you! I was looking at how to do this with Cloudflare right off the bat but couldn't find how to do it. Working now!
I would say this is less about Docker and more about Nginx. It would be nice to easily route subdirectory paths to different Cloudron apps via Nginx. Maybe in the UI there's a way to add a directory path in the Location panel.
Thanks again!
@girish OK, I chose a couple of the other app configs and added a comment. They were overwritten along with the Ghost config I originally was asking about. Any thoughts? Anything significant about the 5am/5pm PT time? Want me to test anything else? Send you some logs?
@robi I haven't tried that because I'm not sure where to put it in order to have it overwrite the default Cloudron configs. Any suggestions on that? Thanks!
@girish Seems to be the consensus, though Google SEO is an ever-changing black box:
https://chrisberkley.com/blog/subdomains-for-seo/
I think it makes sense since many sites have wildly different functionality and content based on subdomains.
@girish OK, interesting. It's happening twice a day at the exact same times. 5am and 5pm PT. Here's a screenshot from Uptime Kuma.
@nebulon OK thanks for this. Won't the redirect have to point to a different domain or subdomain though? I need them to share a root domain in order for the blog traffic to contribute to the static site's SEO.
https://re-public.io --> Surfer, static
https://re-public.io/blog --> Ghost
I'm trying to put my Ghost blog at the /blog
route of my domain, while my static site is served from the /
root via Surfer.
I've got this config at the bottom of the Cloudron-generated .conf
file for the Ghost app:
location /blog {
proxy_pass http://172.18.17.251:2368;
}
location / {
proxy_pass http://172.18.17.70:3000;
}
Which gets overwritten quite often, at least once a day. It there a better way to do this routing or a different file to store the config in so that it doesn't get overwritten?
Or do I need to setup a cron to just place it back in whenever it gets overwritten?
I've read through a few posts here about nginx proxying but its hard to figure out the best method from what's been posted.
Thanks!
@girish Thanks for chiming in here. Indeed telnet gitlab.mydomain.com port
hangs for me as well.
I white listed the port and restarted the cloudron-firewall
service, but still no love.
Any other ideas of what to test/debug?
@scooke No, it was never working. I've always had to use the HTTPS links for repos.
Thanks for those links! I'll check them out and post back here if they work.
@brutalbirdie Sorry, still messing up communication despite my best efforts.
In my previous post, I only cited this command as an example:
git clone ssh://git@git.cloudron.io:6000/cloudron/gitlab-app.git
Since I didn't want to post my actual connection string, which is something like:
git clone ssh://git@gitlab.mydomain.com:XXXXX/cloudron/my-repo.git
And that's the one that is not working and has Operation timed out
as the error. Again, this is not an issue with reaching git.cloudron.io
. It's an issue with reaching gitlab.mydomain.com
.
I'm just trying to use the ssh links for my repos hosted on my Cloudron instance of Gitlab. Nothing fancy. I just can't connect to them from my machine, even though I can ssh into the server that is running Cloudron.
Does that make sense?
@brutalbirdie Thanks for the detailed response. I've actually tried all that and that led me to the issue I was trying to describe originally. Sorry I'm not being clear.
git clone ssh://git@git.cloudron.io:6000/cloudron/gitlab-app.git
Gives me an Operation timed out
error.
Any ideas how to debug? Would this be on the Gitlab side or the Cloudron side?
@BrutalBirdie So just to clarify, I can only ever use HTTPS clone urls as well?
@brutalbirdie Ah OK, interesting. Thanks for the answer!
My ssh connection to Gitlab isn't working. I've set the SSH Port in the Cloudron app settings, but it doesn't seem to be punching through. Attempts to connect just hang with ssh git@gitlab.mydomain.com
I've tried specifying the port: ssh -Tvvv -p XXXXX git@gitlab.mydomain.com
debug1: Reading configuration data /Users/admin/.ssh/config
debug1: /Users/admin/.ssh/config line 1: Applying options for *
debug1: /Users/admin/.ssh/config line 9: Applying options for gitlab.mydomain.com
debug2: add_identity_file: ignoring duplicate key ~/.ssh/id_rsa
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to gitlab.mydomain.com port XXXXX.
I can ssh into the actual Cloudron server on port XXXXX with my root user.
Do I need to create a git
user on Cloudron? Maybe adjust the iptables
rules?
Any help is appreciated!