same database and diferents web interface front end?!!!

nokiado 5 years ago

How should I configure the traccar to be able to have several web and that they connect to the same database

Anton Tananaev 5 years ago

On different servers or just different web apps?

nokiado 5 years ago

Same server, Same db and differents web apps personalize ( differents logos, appearence)

Anton Tananaev 5 years ago

You can host as many web apps as you want. We already have two.

nokiado 5 years ago

i have this problem
another webapp
http://mydomain.com/gps1
.....
http://mydomain.com/gps1/api/server?_dc=1610055193155
404 - Not Found

Anton Tananaev 5 years ago

Obviously you have to configure paths correctly.

nokiado 5 years ago

where ?

David 5 years ago

This information would be very useful, has anyone succeeded?

mohamed_fadol 5 years ago

Anton can explain more , i have same problem ):

Anton Tananaev 5 years ago

You have to update all API endpoints. One option is to make paths relative to the root instead.

For example, you can replace api/server with /api/server.

David 5 years ago

Thanks Anton for the explanation.

Those of us who do not have much knowledge, could someone explain it step by step?

what api do you mean? sorry I have little knowledge

Anton Tananaev 5 years ago

You would have to have some software development knowledge to work with the source code.

David 5 years ago

Thanks Anton for the explanation!

mohamed_fadol 5 years ago

Thanks Anton for replay

I have an knowledge in laravel framework which already used api route , i installed Traccar serves web interface on vps and API using regular HTTP protocol for using api by laravel api , but the config run default traccar not my laravel api .
apatche2 like below :

<IfModule mod_ssl.c>
        <VirtualHost _default_:443 *:80>
                ServerName domain.net
                ServerAdmin webmaster@localhost
                    // directory of file api name of laravel project file 
   		DocumentRoot /var/www/html/api/public
   		<Directory /var/www/html/api>
      		 AllowOverride All
  		 </Directory>
		ProxyRequests off
		ProxyPass /gps/api/socket ws://localhost:8082/api/socket
		ProxyPassReverse /gps/api/socket ws://localhost:8082/api/socket
		ProxyPass /gps/ http://localhost:8082/
		ProxyPassReverse /gps/ http://localhost:8082/
		ProxyPassReverseCookiePath / /gps/
		Redirect permanent /gps /gps/
                ProxyPass /api/socket ws://localhost:8082/api/socket
                ProxyPassReverse /api/socket ws://localhost:8082/api/socket
                ProxyPass / http://localhost:8082/
                ProxyPassReverse / http://localhost:8082/
                SSLEngine on
                SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
                SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
        </VirtualHost>
</IfModule>

what are problems in config

Tracker 5 years ago

Hi David,

Below is how I managed to get it to work. Anton please advise if this will cause performance or any other issues.

  1. Make a copy of the web folder and rename to web1
  2. Save web1 folder in web folder
  3. In web1 folder open app.min.js file with Notepad++
  4. Select "search", "replace" and replace all api/ with /api/
  5. Save
  6. Open the web interface with http://localhost:8082/web1