10 months ago
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? <@539512869780455445>
P.S. I followed this guide: https://myrailslearnings.wordpress.com/2020/01/18/how-do-i-add-a-wordpress-blog-to-my-rails-app/
0 Replies
10 months ago
why was I summoned lol
10 months ago
n/a
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.
10 months ago
I was awake, just curious as to why I was picked to be pinged haha
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.
10 months ago
I assume the blog is wordpress right?
10 months ago
so the obvious solution is to run wordpress on Railway 🙂
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?
10 months ago
why do you need a reverse proxy? they are different domains
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.
10 months ago
by point do you mean redirect?
10 months ago
and that's an in-code redirect?
10 months ago
can you send clickable links to both domains, I'm on mobile
Yeah, my route is
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)
10 months ago
do you need access to the filesystem of your wordpress install on siteground?
10 months ago
so let's just move your wordpress install to Railway?
10 months ago
you could keep the same blog. subdomain
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?
10 months 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?
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?
10 months ago
so you aren't happy with just the redirect?
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.
10 months ago
yeah then you don't need a reverse proxy, you just attach the blog subdomain to the wordpress service
10 months ago
why does the imagifyr service have a wildcard?
10 months ago
if you don't need a wildcard, there's no reason to have one
Gotcha, I will give this a shot over the weekend. Thanks for the lessons sir!
10 months 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
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!
10 months ago
haha I'm not American, but thank you 🙂
@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…
Would be nice if I can go access the .htaccess or something and just edit it.
10 months ago
how large is your backup file?
10 months 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');
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?
10 months ago
oh, sorry didnt notice the edit
10 months ago
edited
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.
10 months ago
are you sure that isnt a limitation of the plugin?
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);
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
10 months ago
okay ill deploy wordpress and see what i can figure out
10 months ago
no problem!
10 months ago
> Remove upload limits
10 months ago
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
Might just copy and paste the posts, I'm not sure how to do that. There's only 9 posts so far.
10 months ago
whatever works best for you
10 months ago
no problem