Page 1 of 1
Moving servers
Posted: Tue Jan 31, 2012 11:50 am
by yellowled
Trying to move a dev blog from one machine to another.
Steps:
1. Export MySQL db.
2. Copy original blog installation to second machine's /var/www/
3. Adapt permissions.
4. Import db.
5. Log in, do the IT Crowd (turn it off and on again) w/ rewrite option.
Everything works fine, except I can't get rewriting to work. Both machines are pretty much set up the same way (same Ubuntu version etc.), actually, both .htaccess files are *exactly* the same. It works on one machine, it doesn't on the second.
Any ideas what might have gone wrong here?
YL
Re: Moving servers
Posted: Tue Jan 31, 2012 12:36 pm
by kleinerChemiker
yellowled wrote:..., it doesn't on the second.
Being a bit more elaborate might help

Re: Moving servers
Posted: Tue Jan 31, 2012 12:45 pm
by yellowled
kleinerChemiker wrote:Being a bit more elaborate might help

Well, let's put it this way: the moved blog is working on the second machine. The only thing which doesn't work there is rewriting. mod_rewrite is active, the .htaccess is being written if I turn it off and on again, but with mod_rewrite, both backend and frontend don't get any CSS. Also, URLs like /admin, /archive/ etc. do not work with rewriting. Everything works just hunky-dory without rewriting.
Both installations are in the same directory on an Apache2 webserver. I skimmed the enabled mods, they should be the same. So this can only be an issue of .htaccess (they are the same), server config or mod_rewrite config, I guess.
Need more? Give me a hint as to what you need.
YL
Re: Moving servers
Posted: Tue Jan 31, 2012 12:52 pm
by kleinerChemiker
Not working could also mean you get a blank page.
I'm not sure if rewrites are also loggt in the normal access log. You could have a look there. If not you could turn on logging for the rewrite module:
http://httpd.apache.org/docs/2.0/mod/mo ... rewritelog
Re: Moving servers
Posted: Tue Jan 31, 2012 1:02 pm
by yellowled
kleinerChemiker wrote:I'm not sure if rewrites are also loggt in the normal access log.
No, but in the error.log:
Code: Select all
[Tue Jan 31 12:58:32 2012] [error] [client 127.0.0.1] File does not exist: /var/www/serendipity/serendipity.css, referer: http://localhost/serendipity/
Not sure what to make of it … serendipity.css should be serendipity.css.php, which should be rewritten by
Code: Select all
RewriteRule ^(serendipity\.css|serendipity_admin\.css)$ index.php?url=/$1 [L,QSA]
YL
Re: Moving servers
Posted: Tue Jan 31, 2012 1:09 pm
by garvinhicking
Hi!
Did you check to use the "1&1" server compatible htaccess syntax?
Did you fully compare all involved Apache2 config files of the two servers? Definitely something would be differing there...
Regards,
Garvin
Re: Moving servers
Posted: Tue Jan 31, 2012 1:10 pm
by yellowled
garvinhicking wrote:Did you check to use the "1&1" server compatible htaccess syntax?
Yup, does not work, either.
garvinhicking wrote:Did you fully compare all involved Apache2 config files of the two servers?
Not yet. Will do.
YL
Re: Moving servers
Posted: Tue Jan 31, 2012 1:11 pm
by kleinerChemiker
Are you useing an 1&1 server? You could try this line:
Code: Select all
RewriteRule ^(serendipity\.css|serendipity_admin\.css) index.php?url=/$1 [L,QSA]
Re: Moving servers
Posted: Tue Jan 31, 2012 1:26 pm
by yellowled
kleinerChemiker wrote:Are you useing an 1&1 server?
Never.
This is strictly local on my own machines.
YL
Re: Moving servers
Posted: Tue Jan 31, 2012 1:32 pm
by yellowled
garvinhicking wrote:Did you fully compare all involved Apache2 config files of the two servers?
You're good.
Turns out I hadn't set AllowOverride to All in /etc/apache2/sites-available/default on the 2nd machine, that did the trick. Thanks!
YL