Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What we are trying to achieve is to have an in house Linux-based (probably Ubuntu) web server which we can test on before pushing to our remote dedicated hosting server.

The problem we are going to face though is that at the moment what we do works because we edit (sometimes huge websites) locally on our Macs and Coda flags those edited files and allows us to publish the changed files to the live site (we also maintain and update a remote SVN repo for each project).

When we implement a LAMP in house server though we cannot figure out a way to efficiently push to the local machine and then push to the remote server when we're happy.

One thing we thought of was creating (somehow) a networked alias folder which can sit as the "local" directory in Coda and the public_html folder on apache (on the web server). This would mean that we work directly from the local live folder and only click "publish" when we want to make the changes live. I'm not sure how possible this is, and if we're all working from the server then there could be networking issues and all sorts - not to mention if two people were to try and edit the same file at once.

What would be really useful would be to have some sort of software that will flag changes on the local server and then push them to the live server when we're happy to do so. Is there anything like that out there?

Or is there another way to do this at all? It'd be good to know what other people do to get round this problem. I would assume that other companies publish to a test server before publishing the changes live. What we don't want to have to end up doing is a) publishing the WHOLE site each time we make changes or b) having to write down all the files we change and publishing them separately (through an FTP client or similar).

Thanks guys

(ps: I'm not sure if this is completely fitting for this SE site. I started off with a linux-specific question and I've generalised it to get help for this problem)

share|improve this question
1  
IMHO, you question is unanswerable. It is too much generic, try to go deeper in details. E.g. which tools and technologies do you use to develop? Why do you not use SVN (or some other code repository) as main tool to share and publish your work? –  andcoz Oct 18 '11 at 16:26
    
Why couldn't you pull the code that you're ready to go live, onto the test server in svn? –  frogstarr78 Oct 18 '11 at 18:22
    
Ah if we can use SVN then that would be much better... how would we do that? Would we set the public_html folder on the remote server (and testing server) as a working copy and just do SVN update when we want to update to the latest copy? How will that work with software like wordpress where files can be added/removed on the server though? Will that not create issues with SVN? –  Thomas Clayson Oct 19 '11 at 9:52

1 Answer 1

up vote 2 down vote accepted

Software to push changes incrementally is rsync.

While this answers the question you asked, it is not the best method. For example there won't be any protection against concurrent editing. Rather, you should make the webserver check out from subversion. Make sure to forbid access to the .svn directories in .htaccess. Let developers trigger a “check out this known good revision” action on the live server.

share|improve this answer
    
This sounds like a good idea. How would we do that? Log into SSH and do svn export on the public_html dir? Will that merge the directories and not touch any files that may have been created/uploaded from the website itself? –  Thomas Clayson Oct 19 '11 at 10:08
    
@Thomas Do an svn checkout on the server, then svn update periodically. Put an ignore property on files and directories that are created on the live system. –  Gilles Oct 20 '11 at 1:45
    
Thanks for this, this has been working for us. It doesn't feel "right", but it serves the purpose. –  Thomas Clayson Dec 9 '11 at 11:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.