Moving servers

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Moving servers

Post 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
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Moving servers

Post by kleinerChemiker »

yellowled wrote:..., it doesn't on the second.
Being a bit more elaborate might help ;)
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Moving servers

Post by yellowled »

kleinerChemiker wrote:Being a bit more elaborate might help ;)
:lol:

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
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Moving servers

Post 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
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Moving servers

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Moving servers

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Moving servers

Post 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
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Moving servers

Post 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]
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Moving servers

Post by yellowled »

kleinerChemiker wrote:Are you useing an 1&1 server?
Never. :shock:

This is strictly local on my own machines.

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Moving servers

Post 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
Post Reply