Forum Problems Installing LAMS: LAMS not serving CSS to clients on LAN?


 
You may request notification for LAMS not serving CSS to clients on LAN?.
Search: 

1: LAMS not serving CSS to clients on LAN?
10/07/07 09:35 AM
[ Reply | Forward ]
Hi

I'm running LAMS 2.0.4 on a MacBook Pro with MacOS 10.4.10. LAMS on the notebook itself runs perfectly in every way. I can author, monitor, etc.

But if I try to connect to LAMS using another computer on my LAN the pages appear as text only (no images and no CSS applied).

Looking at the login page source on a client computer I see that "localhost" appears often where I think an IP address should be. For example:

http://localhost:8080/lams/css/defaultHTML.css

I guess this explains why LAMS runs fine on the Macbook, but serves pages unformatted to clients on the LAN.

So my question is: How do I fix this?

I tried editing the lams.properties file in /etc/lams2... I changed the server URL as follows to include the IP address of the Macbook hosting LAMS:

SERVER_URL=http://192.168.1.185:8080/lams/

I then stopped LAMS and restarted it. But this didn't fix the problem.

Is there something else I should change? Or must I reinstall LAMS? Or both?

Thanks
Barry

South Africa

Posted by Barry Kayton

2: Re: LAMS not serving CSS to clients on LAN?
In response to 1 10/07/07 05:35 PM
[ Reply | Forward ]
You were right in your guess that it is the server URL that is the problem. You shouldn't need to reinstall LAMS, nor should you need to change anytihng else.

If you have the serverURL set to "http://192.168.1.185:8080/lams/" and access LAMS on the client computer as "http://192.168.1.185:8080/lams/" then you should get it nicely formatted, not as text only. You don't even need to restart LAMS to get the effect - logging out and logging in again pick up a serverURL change.

So I'm a bit puzzled on that one. 192.168.1.185 is a local address, so people wouldn't be able to access it externally, but you are on a LAN. And if they couldn't access the Macbook as 192.168.1.185 then they wouldn't even be able to log in.

Can you try it again from a client and check the source of a page, and confirm that the src has "http://192.168.1.185:8080/lams/css/defaultHTML.css" and you haven't had a whitespace character creep in on the end of the server URL somehow.

Then try accessing the actual stylesheet from the client computer ie paste http://192.168.1.185:8080/lams/css/defaultHTML.css into the URL box and see if the stylesheet loads. If it doesn't load, what error do you get?

Also try accessing one of the images e.g. http://192.168.1.185:8080/lams/images/css/lams_login.gif. Do you get the image - it should be the big LAMS logo from the login page.

Fiona

Posted by Fiona Malikoff

3: Re: Re: LAMS not serving CSS to clients on LAN?
In response to 2 10/07/07 06:32 PM
[ Reply | Forward ]
Barry,

> If you have the serverURL set to "http://192.168.1.185:8080/lams/" and access LAMS on the
> client computer as "http://192.168.1.185:8080/lams/" then you should get it nicely formatted, not as text only.

Just adding to what Fiona mentioned above:

Note that you do this by login into LAMS as Sysadmin and then clicking on the Sysadmin menu. Then go to the "Edit Configuration" and change the ServerURL to be "http://192.168.1.185:8080/lams/". Save the changes and that should do

Changing the lams.properties in the /etc/lams2 won't fix this though.

Ernie

Posted by Ernie Ghiglione

4: Re: Re: Re: LAMS not serving CSS to clients on LAN?
In response to 3 10/08/07 01:49 AM
[ Reply | Forward ]
Fiona & Ernie,

Thanks for your replies.

I had actually looked at the configuration page, but I obviously overlooked the serverURL field. Doh!

I've changed it now and it's working fine.

Thanks again
Barry

Posted by Barry Kayton

Reply to first post on this page
Back to Problems Installing LAMS