Home | Tutorials | Wiki | Issues
Ask Your Question
0

GZWeb 1.4.0 only displaying text and broken images

asked 2018-11-12 15:50:15 -0600

SimLeek gravatar image

I was able to setup gzserver and gzweb with few if any problems, but when I check the online site, I see this:

image description

That's showing in both Firefox and Chrome. I did notice npm saying one package wasn't compatible with Ubuntu 16.04, and that another wasn't going to be installed but was optional. I tried using "npm bug gzweb" to get more details on the bugs, but it came back as "Not found : gzweb". Running "npm start" also seems to give no errors.

Viewing the source of the webpage though, I wonder if it's expecting me to run in localhost. Are there extra steps that should be taken when setting it up on an actual webserver? Other than the apache2 ProxyPass stuff with password protection?

I'm using Ubuntu Server 16.04.5 LTS with Gazebo 7.14.0 and gzweb 1.4.0.

edit retag flag offensive close merge delete

Comments

On the browser's network tab, can you check where it is trying to get the CSS and JS files from, and whether you're serving them on that same URL?

chapulina gravatar imagechapulina ( 2018-11-13 12:47:55 -0600 )edit

Ah, it's expecting website.com/style/gz3d.css, but it's at website.com/gzweb/style/gz3d.css, because I'm using proxypass to set up multiple services on the server. I'll have to edit that. Also, I may need to add some more stuff to allow web sockets through.

SimLeek gravatar imageSimLeek ( 2018-11-13 20:17:19 -0600 )edit

I'd love to edit the answer I gave so it's nice, searchable text, but I guess that's also going to have to wait for moderator approval. It should still be searchable enough though, i suppose.

SimLeek gravatar imageSimLeek ( 2018-11-13 20:48:58 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-11-13 20:47:58 -0600

SimLeek gravatar image

I found it!

In /etc/apache2/sites-available, my site_blah.conf file was originally configured like this:

    ProxyPass /world http://localhost:8083/
    ProxyPassReverse /world http://localhost:8083/

    ProxyPass /gzserv http://localhost:11345/
    ProxyPassReverse /gzserv http://localhost:11345/

    ProxyPass /ros http://localhost:11311/
    ProxyPassReverse /ros http://localhost:11311/

    ProxyPass /roswww http://localhost:8085/
    ProxyPassReverse /roswww http://localhost:8085/

So gzweb showed up when I went to website.com/world, as if the whole site were a single file. So when I changed it to this:

    ProxyPass /world/ http://localhost:8083/
    ProxyPassReverse /world/ http://localhost:8083/

    ProxyPass /gzserv/ http://localhost:11345/
    ProxyPassReverse /gzserv/ http://localhost:11345/

    ProxyPass /ros/ http://localhost:11311/
    ProxyPassReverse /ros/ http://localhost:11311/

    ProxyPass /roswww/ http://localhost:8085/
    ProxyPassReverse /roswww/ http://localhost:8085/

It loaded index.html and everything else, instead of just index.html.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-11-12 15:49:41 -0600

Seen: 333 times

Last updated: Nov 13 '18