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

224
Views
Mi http://www.example.com redirige a https, pero mi http://example.com no. Por qué

Estoy tratando de hacer que mi sitio web sea accesible a través de estas 4 opciones (2 a través de HTTPS y 2 a través de HTTP para ser redirigido a HTTPS): https://www.example.com , https://example.com , http: //www.example.com y http://example.com , pero el último es el único que no funciona, por alguna razón, en lugar de redirigir de http://example.com a https:// example.com , va a la IP del servidor VPS con el puerto al final, ejemplo http://123.456.0.789:3000 y devuelve un error de tiempo de espera.

Mi dominio no está en el mismo lugar que el servidor VPS, así que cambié el tipo de registro del dominio para que coincida con la IP del VPS. A (@) -> IP VPS / A (www) -> IP VPS / AAAA (@) -> VPS IPV6

Aquí está mi configuración de Nginx:

 server { server_name www.example.com example.com; location /socket.io/ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass http://localhost:3000; } location / { proxy_pass http://localhost:3000; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/www.example.com/fullchain.pem; # manage> ssl_certificate_key /etc/letsencrypt/live/www.example.com/privkey.pem; # mana> include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot server { if ($host = example.com) { return 301 https://$host$request_uri; } # managed by Certbot if ($host = www.example.com) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; server_name www.example.com example.com; return 404; # managed by Certbot }
over 4 years ago · Santiago Trujillo
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!