Hi, I have an apache2 running and I want to run traccar in a subdir of my web root like e.g. www-dot-example-dot-org/tracc. I have already a Let's encrypt certificate, running standard Let's encrypt config 000-default-le-ssl.conf.
Instead of creating a separate traccar.conf as described in [Secure Connection] (I never got it running in the last years), I used to copy the mentioned block into my 000-default-le-ssl.conf directly:
ProxyRequests off
ProxyPass /tracc/api/socket ws://localhost:8082/api/socket
ProxyPassReverse /tracc/api/socket ws://localhost:8082/api/socket
ProxyPass /tracc/ http://localhost:8082/
ProxyPassReverse /tracc/ http://localhost:8082/
ProxyPassReverseCookiePath / /tracc/
Redirect permanent /tracc /tracc/
This worked for years on an ubuntu 18 server, but now (Jan 2023) I wanted to update to ubuntu 22 and re-installed my server from scratch. All is running fine, including the new traccar installation locally on myserverhostname:8082. Now I wanted to access traccar securely from external via the www-dot-example-dot-org/tracc address.
To do this, I edited the 000-default-le-ssl.conf as described above and performed
sudo apt-get install ssl-cert
sudo a2enmod ssl proxy_http proxy_wstunnel rewrite
sudo service apache2 restart
When navigating to the intended URL (like www-dot-example-dot-org/tracc), the browser shows just a white page, without content.
The current output is:
<body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root" class="root"></div></body>
Error message on the browser console (Firefox):
GET https_www-dot-example-dot-org/tracc/ [HTTP/1.1 200 OK 15ms]
GET https_www-dot-example-dot-org/styles.css [HTTP/1.1 404 Not Found 2ms]
GET https_www-dot-example-dot-org/static/js/main.276d165c.js [HTTP/1.1 404 Not Found 3ms]
GET https_www-dot-example-dot-org/static/css/main.967cebd1.css [HTTP/1.1 404 Not Found 3ms]
GET https_www-dot-example-dot-org/static/js/main.276d165c.js [HTTP/1.1 404 Not Found 4ms]
GET https_www-dot-example-dot-org/logo192.png [HTTP/1.1 404 Not Found 2ms]
So the first line shows success (traccar subdir correctly found), but the server expects the files beyond /opt/traccar/modern in the server root directory. I've tried to solve this with symlinks, but at least a further api directory was missing where I was not able to solve it anymore.
There is a hint in the documentation for [Secure Connection], it says (on the very bottom), I should recompile the modern app for it to work correctly on the new path.
I assume I should follow the [Modern Web App] link?
I further assume I should change the backend server URL in development mode? If yes, where to find the .env-file to change it?
I've tried it with sudo npm install and sudo npm start on ubuntu the command line, but it doesn't work: ENOENT: no such file or directory, open '/opt/traccar/modern/package.json'
Is it at all possible to correct that without an offline development environment such as Eclipse? So just on the Linux commandline?
I'm lost here...
(Note: I had to replace all the URL-like strings by non-URL strings, otherwise I would not be able to submit the post. That's why they do not represent the real examples and especially in the Firefox error log.)
Hi, I have an apache2 running and I want to run traccar in a subdir of my web root like e.g. www-dot-example-dot-org/tracc. I have already a Let's encrypt certificate, running standard Let's encrypt config 000-default-le-ssl.conf.
Instead of creating a separate traccar.conf as described in [Secure Connection] (I never got it running in the last years), I used to copy the mentioned block into my 000-default-le-ssl.conf directly:
This worked for years on an ubuntu 18 server, but now (Jan 2023) I wanted to update to ubuntu 22 and re-installed my server from scratch. All is running fine, including the new traccar installation locally on myserverhostname:8082. Now I wanted to access traccar securely from external via the www-dot-example-dot-org/tracc address.
To do this, I edited the 000-default-le-ssl.conf as described above and performed
When navigating to the intended URL (like www-dot-example-dot-org/tracc), the browser shows just a white page, without content.
The current output is:
<body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root" class="root"></div></body>
Error message on the browser console (Firefox):
So the first line shows success (traccar subdir correctly found), but the server expects the files beyond /opt/traccar/modern in the server root directory. I've tried to solve this with symlinks, but at least a further api directory was missing where I was not able to solve it anymore.
There is a hint in the documentation for [Secure Connection], it says (on the very bottom), I should recompile the modern app for it to work correctly on the new path.
I assume I should follow the [Modern Web App] link?
I further assume I should change the backend server URL in development mode? If yes, where to find the .env-file to change it?
I've tried it with sudo npm install and sudo npm start on ubuntu the command line, but it doesn't work:
ENOENT: no such file or directory, open '/opt/traccar/modern/package.json'
Is it at all possible to correct that without an offline development environment such as Eclipse? So just on the Linux commandline?
I'm lost here...
(Note: I had to replace all the URL-like strings by non-URL strings, otherwise I would not be able to submit the post. That's why they do not represent the real examples and especially in the Firefox error log.)