Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

264
Vistas
How configure multiples process on 443 port? Apache - ubuntu

here its my problem:

I have 2 applications configured on a server. React (client) and nodejs backend with their respective domains. 1 - example1.com 2 - example2.com

I have configured both SSL certificates for each of it as well. The problem occurs when you want to start the backend on the same port that the client is running.

Is it possible to run 2 processes on it? How should I do it?

these are my virtual host files:

example1-le.ssl.conf


<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName example1.com
    ServerAlias www.example1.com
    ServerAdmin info@xample.com
    DocumentRoot /var/www/example1
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined


SSLCertificateFile /etc/letsencrypt/live/example1.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example2.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

example1.conf

        ServerName example1.com
        ServerAlias example1.com
        ServerAdmin info@example.com.ar
        DocumentRoot /var/www/example/build

        <Directory "/var/www/example/build">
          RewriteEngine on
         # Don't rewrite files or directories
          RewriteCond %{REQUEST_FILENAME} -f [OR]
          RewriteCond %{REQUEST_FILENAME} -d
          RewriteRule ^ - [L]
           # Rewrite everything else to index.html to allow html5 state links
           RewriteRule ^ index.html [L]
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteCond %{SERVER_NAME} =example1.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

And the same for the another one.

When i tried to start the second project i receive : EADDRINUSE: address already in use :::443

Thanks a lot for you help

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You can NOT have to 2 different processes bind on the same port. What Olaf Kock suggested works fine and is easy to implement: you install apache on a dedicated server (or on the same machine: there's no difference) and then you configure a reverse proxy (the module is called mod_proxy). There are also other solutions (like haproxy) which require a bit more complex configuration but provide many more configuration options.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda