Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

427
Views
port redirection of my nodejs application with apache2

My system is hosted by Amazon LighSail. My application is running with Nodejs on the port 3000. I installed my HTTPS certificate for my domain name with Let's Encrypt.

Now I want to reach my nodejs application directly to my sub-domain.domain.com. When I go to my domain name (sub-domain.domain.com), I'm directed to the bitnami home page.

So I have:

https://sub-domain.domain.com --> bitnami home page

IP-ADDRESS:3000 --> my nodejs application

I add a proxy to redirect all HTTP request to my port 3000 but with no sucess.

My proxy added in /etc/apache2/sites-enabled/000-default.conf :

< VirtualHost *:80 >

ServerAdmin webmaster@localhost

ServerName www.sub-domain.domain.com

ProxyPass / http://127.0.0.1:3000/

ProxyPassReverse / http://127.0.0.1:3000/

DocumentRoot /var/www/html

ErrorLog ${APACHE_LOG_DIR}/error.log

CustomLog ${APACHE_LOG_DIR}/access.log combined 

< / VirtualHost >

Someone has an idea to solve my problem or any clue?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

With SSL Cert the config should look more like this:

<VirtualHost *:80>

        ServerName yoursite.com
        ServerAlias *yoursite.com
        ServerAdmin example@yoursite.com
        DocumentRoot /var/www/yourSite
        LogLevel debug

        SSLEngine on
        SSLCertificateFile /path/to/lets/encrypt/cert
        SSLCertificateKeyFile /path/to/lets/encrypt/key

        SSLProxyEngine on

        ProxyPass "/" "http://127.0.0.1:3000/"
        ProxyPassReverse "/" "http://127.0.0.1:3000/"

        ErrorLog ${APACHE_LOG_DIR}/yourSite_error_https.log
        CustomLog ${APACHE_LOG_DIR}/yourSite_access_https.log combined


</VirtualHost>
over 4 years ago · Santiago Trujillo Report

0

Solved ! I had to add my proxy in this file: /opt/bitnami/apache2/conf/bitnami/bitnami.conf

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!