Page 1 of 1

Css terror

Posted: Sat Jan 07, 2006 1:30 am
by tidalwave
Hello all,

I installed serendipity on a friends server before, worked like a charm. Great system. Now of course I decided I want to host it myself.

Played around a bit, eventually getting the webserver running, Now I got some problems.

When I look from my pc to the webserver, using internal ip addresses, I get to see serendipity in its full glory.

When I let a friend look at the external ip adres which is forwarded by my router to the webserver pc, he gets to see the site but without CSS...

I read about the possible permalink and stuff, I tried it out but doesnt work.

However im not sure the problem is serendipity or my configuration of Apache, seeing how my friend just cant open the css file when I give him the link.

Any help would be appreciated, Im new so ill try pretty much anything :)

greetz,

tidalwave

Posted: Sat Jan 07, 2006 3:12 am
by judebert
Interesting.

Serendipity needs to know where it is (hostname, IP address, whatever) to create appropriate links. Unless I'm mistaken (which is very much possible), your s9y is configured as <internal IP>/<s9ydir>. Whenever s9y provides a link -- including a stylesheet link -- it'll be to <internal IP>/<s9ydir>/<whatever>.

When your pal's browser asks for <external IP>/<s9ydir>/index.php, the router reroutes it to your server, which provides the page... and links for the stylesheet. S9y still thinks it's in <internal IP>/<s9ydir>, so it returns the link to the stylesheet as <internal IP>/<s9ydir>/serendipity_styles.css. Naturally, when your friend's browser looks for the server at <internal IP>, it finds nothing, and so no stylesheet is displayed.

Bet he can't click on any of the links, either, since they're all <internal IP>, too.

If you configure s9y to use <external IP>/<s9ydir>, it might serve up the link to the stylesheet correctly. But I don't know what else it might screw up.

If you're running a Linux computer as the router, you could move the server there, too; then s9y would actually be on <external IP>, and everything would work.

Anyway. I'd try configuring s9y to <external IP>, and if that didn't work, I'd move it to a server with a publicly-accessible IP. If I couldn't do that, I'd see if a proxy on the router would do the trick.

Good luck!
Judebert

Posted: Sat Jan 07, 2006 3:23 pm
by tidalwave
thnx for the info jude,

Fun part I adjusted "URL to blog" to the outside ip adres and now the outside has the css but my internal ip adress dont.

Seems that this causes the css terror, any idea if you can setup the "URL to blog" to 2 addresses??

tidalwave

Posted: Sat Jan 07, 2006 5:01 pm
by judebert
Well, I'm glad that worked! I was afraid there'd be some other repercussions. (Of course, maybe we just haven't seen them yet.)

No, you can only blog from one URL. I suppose S9Y could just use the URL you requested as its base, but I can see that being a security risk, too.

I'm a little surprised that your internal PCs don't understand the external IP. Does the router cut them off from the outside net? Are you using an IP or a hostname? If the latter, perhaps they're just not set up to do the appropriate name resolution. Can they ping the server at the external IP/hostname?

In any case, this is definitely a networking problem, as opposed to a fundamental s9y problem. I hope you can get it resolved!

Judebert