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
Moving servers
-
kleinerChemiker
- Regular
- Posts: 765
- Joined: Tue Oct 17, 2006 2:36 pm
- Location: Vienna/Austria
- Contact:
Re: Moving servers
Being a bit more elaborate might helpyellowled wrote:..., it doesn't on the second.
Re: Moving servers
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
-
kleinerChemiker
- Regular
- Posts: 765
- Joined: Tue Oct 17, 2006 2:36 pm
- Location: Vienna/Austria
- Contact:
Re: Moving servers
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
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
No, but in the error.log:kleinerChemiker wrote:I'm not sure if rewrites are also loggt in the normal access 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/Code: Select all
RewriteRule ^(serendipity\.css|serendipity_admin\.css)$ index.php?url=/$1 [L,QSA]-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Moving servers
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
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/
# 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/
Re: Moving servers
Yup, does not work, either.garvinhicking wrote:Did you check to use the "1&1" server compatible htaccess syntax?
Not yet. Will do.garvinhicking wrote:Did you fully compare all involved Apache2 config files of the two servers?
YL
-
kleinerChemiker
- Regular
- Posts: 765
- Joined: Tue Oct 17, 2006 2:36 pm
- Location: Vienna/Austria
- Contact:
Re: Moving servers
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
Never.kleinerChemiker wrote:Are you useing an 1&1 server?
This is strictly local on my own machines.
YL
Re: Moving servers
You're good.garvinhicking wrote:Did you fully compare all involved Apache2 config files of the two servers?
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