Reverse Proxy for blog.imagifyr.com on Siteground.

Does anyone run a reverse-proxy to their blog? I am hosting imagifyr.com on railway and blog.imagifyr.com on siteground. I'm not too familiar with networking, but requests pass through railway and the IP address keeps getting blocked by Siteground's bots. Does anyone know how to resolve this? @Brody
P.S. I followed this guide: https://myrailslearnings.wordpress.com/2020/01/18/how-do-i-add-a-wordpress-blog-to-my-rails-app/
admin
My Ruby on Rails Learnings
How Do I Add a WordPress Blog to My Rails App?
I wanted to have a robust blog for my Rails app, but I didn’t want to spend too much time on it. Initially I created a simple model (Articles) and added TinyMCE in it, but I ran into some cha…
No description
No description
48 Replies
Percy
Percyβ€’5mo ago
Project ID: N/A
Brody
Brodyβ€’5mo ago
why was I summoned lol
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Lol, darn I'm sorry if I woke you up or something, not urgent. Just siteground redirecting me when I'm running a reverse proxy to my blog.
Brody
Brodyβ€’5mo ago
I was awake, just curious as to why I was picked to be pinged haha
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Honestly, because you are a 🐐 . Not because you are the only person I know who is supporting railway on his shoulders. πŸ˜… πŸ™
LMK if there's someone else I should have pinged instead lol.
Brody
Brodyβ€’5mo ago
I assume the blog is wordpress right?
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Yes sir. WP on siteground.
Brody
Brodyβ€’5mo ago
so the obvious solution is to run wordpress on Railway πŸ™‚
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
I tried doing that but failed multiple times. You can have imagifyr.com on one container and blog.imagifyr.com on another and reverse proxy into each other?
Brody
Brodyβ€’5mo ago
why do you need a reverse proxy? they are different domains
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Because imagifyr.com is a rails app hosted on railway and i just wanted imagifyr.com/blog to point to blog.imagifyr.com for SEO purposes which is why I did it that way.
Brody
Brodyβ€’5mo ago
by point do you mean redirect?
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Yes sir, my poor choice of wording. πŸ™‚
Brody
Brodyβ€’5mo ago
and that's an in-code redirect? can you send clickable links to both domains, I'm on mobile
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Yeah, my route is
get "/blog", to: redirect('https://imagifyr.com/blog/', status: 301)
get "/blog", to: redirect('https://imagifyr.com/blog/', status: 301)
On my rails app. https://imagifyr.com https://imagifyr.com/blog (the redirect) https://blog.imagifyr.com (blog hosted on siteground)
Brody
Brodyβ€’5mo ago
do you need access to the filesystem of your wordpress install on siteground?
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
I have access, but do I need to get in there? No.
Brody
Brodyβ€’5mo ago
so let's just move your wordpress install to Railway? you could keep the same blog. subdomain
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Hm. Ok, I will try again. What you're saying is just create a new project "imagifyr-wordpress" for example and that will have the blog. subdomain and I will reverse proxy into that instead?
No description
Brody
Brodyβ€’5mo ago
You would want to have all services that relate to the other services in the same project, from that screenshot it looks like you are taking backups of your database over the public network and subjecting yourself to egress fees, instead of using the private network, you would want the backup service in the same project so that it can connect to the database via the private network. you would also want the wordpress site in the same project as well. and I'm still not seeing any need for a reverse proxy? can you please explain where you think it fits in?
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
RE: Backup, yeah it's on AWS right now and I'm not doing such volume that it will cost me much (right now it's nothing). RE: So I would put the WP site in imagifyr from what it sounds like? RE: Reverse proxy. Networking noob here. But I'm imagining, if I have another service (Wordpress with blog.imagifyr.com). It would be accessed via blog.imagifyr.com. But I want that blog accessible at imagifyr.com/blog instead. That's where I think the reverse proxy is necessary?
No description
Brody
Brodyβ€’5mo ago
so you aren't happy with just the redirect?
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Sorry, not on the same page I think. I'm fine with the redirect. imagifyr.com/blog just needs to be able to reach the wordpress blog. If your suggested setup accomplishes that, I'm good.
Brody
Brodyβ€’5mo ago
yeah then you don't need a reverse proxy, you just attach the blog subdomain to the wordpress service why does the imagifyr service have a wildcard?
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
It was just setup that way. Should I not have the wildcard?
Brody
Brodyβ€’5mo ago
if you don't need a wildcard, there's no reason to have one
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Gotcha, I will give this a shot over the weekend. Thanks for the lessons sir!
Brody
Brodyβ€’5mo ago
yeah just deploy the wordpress template Jack made, don't worry about the domain yet, just use the railway provided domain to get it all setup, then use some kind of wordpress backup and restore plugin to backup the wordpress install on your old host and restore it to the wordpress install on railway
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
See. G.O.A.T i tell you! G.O.A.T! Thanks for your help this morning sir! Hope you have a happy 4th!
Brody
Brodyβ€’5mo ago
haha I'm not American, but thank you πŸ™‚
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
@Jack anyway to increase the max upload filesize to more than 50mb? https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/ I am importing my WP from siteground to here but the file size is about 150mb...
Yani I
ServMask Helpdesk
How to Increase Maximum Upload File Size in WordPress - ServMask He...
There are 4 ways that you can choose to increase the maximum upload file size in WordPress. 1. Use our plugin (easy) https://import.wp-migration.com 2. Contact hosting provider (medium) Reach over to the customer support of your hosting provider and ask them to increase these limits for you If you are still unable to import your […]
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Would be nice if I can go access the .htaccess or something and just edit it.
Brody
Brodyβ€’5mo ago
how large is your backup file?
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
About 150MB.
Brody
Brodyβ€’5mo ago
try setting the WORDPRESS_CONFIG_EXTRA variable to -
define('DOMAIN_CURRENT_SITE','${{RAILWAY_PUBLIC_DOMAIN}}');define('WP_HOME','https://${{RAILWAY_PUBLIC_DOMAIN}}');define('WP_SITEURL','https://${{RAILWAY_PUBLIC_DOMAIN}}');@ini_set('upload_max_filesize','200M');@ini_set('post_max_size','200M');@ini_set('memory_limit','500M');@ini_set('max_execution_time','500');@ini_set('max_input_time','500');
define('DOMAIN_CURRENT_SITE','${{RAILWAY_PUBLIC_DOMAIN}}');define('WP_HOME','https://${{RAILWAY_PUBLIC_DOMAIN}}');define('WP_SITEURL','https://${{RAILWAY_PUBLIC_DOMAIN}}');@ini_set('upload_max_filesize','200M');@ini_set('post_max_size','200M');@ini_set('memory_limit','500M');@ini_set('max_execution_time','500');@ini_set('max_input_time','500');
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
OK trying. Would @ini_set('upload_max_filesize','128M') be something like @ini_set('upload_max_filesize','170M') if my import file is 157MB though?
Brody
Brodyβ€’5mo ago
oh, sorry didnt notice the edit edited
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Np. Deploying now! Thanks for the help!
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Sorry to keep bugging you, but the WORDPRESS_CONFIG_EXTRA didn't seem to update the upload limit or do I have to wait for post deploy to finish because it's been stuck like that for some time.
No description
No description
Brody
Brodyβ€’5mo ago
are you sure that isnt a limitation of the plugin?
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Pretty certain. I made another edit to bring up Plugin Editor: https://www.ionos.com/digitalguide/hosting/blogs/activate-wordpress-theme-and-plug-in-editor/
define('DOMAIN_CURRENT_SITE','blog.pinagenda.com');define('WP_HOME','https://blog.pinagenda.com');define('WP_SITEURL','https://blog.pinagenda.com');@ini_set('upload_max_filesize','200M');@ini_set('post_max_size','200M');@ini_set('memory_limit','500M');@ini_set('max_execution_time','500');@ini_set('max_input_time','500');define('DISALLOW_FILE_EDIT', false);
define('DOMAIN_CURRENT_SITE','blog.pinagenda.com');define('WP_HOME','https://blog.pinagenda.com');define('WP_SITEURL','https://blog.pinagenda.com');@ini_set('upload_max_filesize','200M');@ini_set('post_max_size','200M');@ini_set('memory_limit','500M');@ini_set('max_execution_time','500');@ini_set('max_input_time','500');define('DISALLOW_FILE_EDIT', false);
With define('DISALLOW_FILE_EDIT', false) And it isn't being applied. I'm using All in one WP Migration and according to this blog: https://wpadventure.com/how-to-increase-the-all-in-one-wp-migration-plugin-upload-import-limit/ The default seems to be 512MB. My hunch is that the deploying isn't taking notice of the WORDPRESS_CONFIG_EXTRA
IONOS Digital Guide
How to enable Theme- and Plugin Editor in WordPress
When you set up your WordPress installation with our Click & Buildapplications, we make some settings and add features to make creating your website easier and safer. For example, we disable the theme and plugin editors. This article explains how you can reactivate the Theme and Plugin Editor afterwards.
WP Adventure
How to increase the size (import) limit in All in One WP Migration ...
You can now easily increase the size (import) limit for the All in One WP Migration plugin. This post with screenshots is an easy guide.
No description
Brody
Brodyβ€’5mo ago
okay ill deploy wordpress and see what i can figure out
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Sorry for the trouble and thanks for your help!
Brody
Brodyβ€’5mo ago
no problem! https://servmask.com/products/unlimited-extension
Remove upload limits
you might have better luck with backing up the database on your current host and restoring it to the database on railway, and then copying over your /var/www/html folder on your current host into the volume on the mysql service
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Might just copy and paste the posts, I'm not sure how to do that. There's only 9 posts so far.
Brody
Brodyβ€’5mo ago
whatever works best for you
Donald Lee (312477)
Donald Lee (312477)OPβ€’5mo ago
Thanks for your help today anyways!
Brody
Brodyβ€’5mo ago
no problem
Want results from more Discord servers?
Add your server