Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-02-01 21:51:02

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

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

#2 2011-02-06 18:07:48

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: Remote hosting, local admin

No idea ? No experience yet ?

Offline

#3 2011-02-06 21:07:52

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#4 2011-02-07 17:27:32

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,483
Bitbucket GitHub

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

#5 2011-02-07 18:05:43

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#6 2011-02-08 08:53:08

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

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

#7 2011-02-10 16:58:34

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#8 2011-02-14 12:53:32

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

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

Board footer

Powered by FluxBB