URL for web ui issue

shawn8087 years ago

For the URL structure, how can I properly configure the web ui with the a domain? For example I traccar.domain.com. I have traccar includin web elements all inside opt inside a centos 7. To access traccarnright now I can type any domain on the vps and put ":8082" and open up traccar web ui. But that's weird . Should i configure the config file for traccar like I did for MySQL? In the past I did Apache port forward for the domain however it would open but wouldn't display devices . What's the right way of conntecting a dedicated domain? Please advice anyone .

Anton Tananaev7 years ago

If you don't want to specify port explicitly, you can change port to 80 (default HTTP) in the config file.

Apache proxy would work as well, but if you have a dedicated IP address for your Traccar instance, it's not required.

shawn8087 years ago

Yes getting separate ip is very cheap for the vps but how should I go about pointing a ip the traccar server ? It's a Linux server with whm. I'll ask the host provider but I'm not sure because pointing port 80 will shut down everything since it's the default port no?

shawn8087 years ago

Should i change anything in the traccar config file? All I want is like you said to not use the port after domain.

Anton Tananaev7 years ago
how should I go about pointing a ip the traccar server?

You don't need to point it. Traccar automatically listens on all the interfaces, so if IP address is assigned to the VPS, Traccar will be available on it.

because pointing port 80 will shut down everything since it’s the default port no?

That's why I said it's an option if Traccar has a dedicated IP address. If not, you can use proxy.

shawn8087 years ago

Okay it's working now but the device won't show on map. Here is the domain name "locas.atozws.com" and ssl was installed . However ui loads but not device on map.

Anton Tananaev7 years ago

Most likely it means that you haven't forwarded WebSocket connection.

shawn8087 years ago

What does this mean?

Anton Tananaev7 years ago

It means exactly what it says. How did you install SSL?

shawn8087 years ago

Like this

Created file /etc/apache2/conf.d/userdata/ssl/2_4/atozws/locas.atozws.com/proxy.conf .

root@host [~]# cat /etc/apache2/conf.d/userdata/ssl/2_4/atozws/locas.atozws.com/proxy.conf 
ProxyPass /api/socket ws://localhost:8082/api/socket
ProxyPassReverse /api/socket ws://localhost:8082/api/socket

ProxyPass / http://localhost:8082/
ProxyPassReverse / http://localhost:8082/

Executed following commands :

/scripts/ensure_vhost_includes --domain=locas.atozws.com
/scripts/restartsrv_httpd
Anton Tananaev7 years ago

Check browser developer console for errors and warnings.

shawn8087 years ago

What about clearing cache for java or something like this ?

Anton Tananaev7 years ago

What about it and how is it related?

shawn8087 years ago

I'm not sure what's wrong honestly .

Anton Tananaev7 years ago

Have you checked browser console? Nothing there?