Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Remote hosting, local admin
Hello all,
I have 2 questions :
I have a TXP website remotely hosted, and I can access the remote database from my local machine by providing the adequate values in my local config.php.
I already tried all locally, with 2 different textpattern/ directories and each config.php pointing to the same database.
It seems to work perfectly … it seems. So my first question is :
are there any problems I may encounter doing like that ?
If there’s no problem, here comes the second question :
what do I have to keep on each side, what do I have to remove (or rename) from remote side to be sure that nobody will access the backend ?
(ok, there are three questions …)
Thank you !
Offline
Re: Remote hosting, local admin
No idea ? No experience yet ?
Offline
Re: Remote hosting, local admin
A fairly easy change is to move the textpattern directory out of the public side using the multisite configuration or something similar. Requires symlinks, which not all web hosting setups allow.
Code is topiary
Offline
Re: Remote hosting, local admin
You could also restrict access to the remote installation at an IP level using .htaccess. For example, if your local computer has a static IP, then set .htaccess to only allow that IP (you could also add in 127.0.0.1 to be sure), blocking all other IP ranges. If your local computer IP is dyamic, some research into your netblock would allow you to restrict it to only that netblock.
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html
http://www.javascriptkit.com/howto/htaccess5.shtml
Offline
Re: Remote hosting, local admin
Hi Claire.
What are you trying to achieve by having two different installations (one local, one remote) accessing the same (remote) database?
Offline
Re: Remote hosting, local admin
Thank you all, these are good tips.
Maniqui asked the good question : the goal is to be sure that nobody except me can access the back end. In fact I discovered by chance that I could acccess the remote database from a local installation the day I did an import and forgot to change the preferences. No harm, but gave me the idea :)
Another idea would be to access multiple sites, having only one local installation for the admin and changing the config.php accordingly. I’m aware that it may cause additional work when upgrading textpattern, but I’m pretty sure it will help for every-day job when you have multiple sites to monitor ans animate.
I’m would be happy to hear from you :)
Offline
Re: Remote hosting, local admin
Well, I may be wrong, but the issue I see here is that you are running TXP locally, but connecting to a remote DB. Yes, you can create articles and other kind of “text based” content that gets saved directly to the DB, no problem with that.
But the problem will come when you try to upload files/images, as, alghouth the entries will be correctly created in the DB, the file/image will get saved in your local folders… right?
Offline
Re: Remote hosting, local admin
maniqui a écrit:
alghouth the entries will be correctly created in the DB, the file/image will get saved in your local folders… right?
Ah, yes. I didn’t notice because I don’t use these features as the sites I’m thinking about are completely mine and I do whatever I want to. But I have to take care of it when it is for a client.
Edit : actually, I have a warning telling me that the folder isn’t writable. The reason is that the paths are not the same and the remote one doesn’t exist on my machine. So it’s clear that images and files would be saved locally.
Last edited by CeBe (2011-02-14 12:59:31)
Offline
Pages: 1