web + traccar + apache + debian12

astronaut 2 years ago

Hi for all. I have a web in debian. the "name" is web.com and it has it ssl certificate in /var/www/html. Well, I have traccar in this VPS too in /opt/traccar/ but cant create the ssl.

My actual virtual host in /etc/apache2/sites-available/ is:

<VirtualHost *:80>
      ServerAdmin webmaster@webdotcom
       DocumentRoot /var/www/html
       ServerName webdotcom
       ServerAlias wwwdotwebdotcom
       <Directory />
             Options -Indexes +FollowSymLinks +MultiViews
             AllowOverride All
             Require all granted
       </Directory>
       ErrorLog ${APACHE_LOG_DIR}/midominio-error.log
       LogLevel warn
       CustomLog ${APACHE_LOG_DIR}/midominio-access.log combined
</VirtualHost>
<VirtualHost *:443>
       ServerAdmin webmaster@webdotcom
       DocumentRoot /var/www/html
       ServerName web.com
       ServerAlias www.web.com
       <Directory />
             Options -Indexes +FollowSymLinks +MultiViews
             AllowOverride All
             Require all granted
       </Directory>
       SSLEngine on
       SSLCertificateFile /etc/letsencrypt/live/www.webdotcom/cert.pem
       SSLCertificateKeyFile /etc/letsencrypt/live/www.webdotcom/privkey.pem
       SSLCertificateChainFile /etc/letsencrypt/live/www.webdotcom/chain.pem
       ErrorLog ${APACHE_LOG_DIR}/midominio-errordotlog
       LogLevel warn
       CustomLog ${APACHE_LOG_DIR}/midominio-accessdotlog combined
</VirtualHost>

but when I try <VirtualHost *:8082> apache2 says it is no well sintaxed.

Do you have your new configuration to work web and traccar?

now my web is web.com -> for example:

httpS://web.com -> 50.50.50.50
traccar -> http://50.50.50.50:8082

can anybode help with a valid configuration?

Anton Tananaev 2 years ago

Why would you add port 8082 to Apache? Isn't that the port you use in Traccar?

astronaut 2 years ago

yes, is the port I use in traccar

Anton Tananaev 2 years ago

Then I'm very confused why you're trying to put it in Apache. You understand that two different processes can't listen to the same port, right?

astronaut 2 years ago

Web: 80-443
traccar: 8082