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

388
Vistas
how to enable .htaccess in AWS Lightsail LAMP module

I am new to AWS Light sail. I have successfully migrated my web application to a LAMP server(bitnami) and I generated SSL certificate. now I want to redirect to HTTP to HTTPS. Hence I created .htaccess and copied the below the code and restarted my server. but the page is not migrating from http to https. can you please help me to enable .htaccess?

since i am planning to host 3 websites, i am looking for htaccess so that i can configure locally based on the condition.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^test\.in [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.test.in/$1 [R,L]

Thank you.

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

0

Bitnami Engineer here:

By default, we disable .htaccess files due to security and performance reasons. We also move .htaccess files content to a file called htaccess.conf in the folder /opt/bitnami/apps/APPNAME/conf. You can check more about it at https://docs.bitnami.com/aws/infrastructure/lamp/administration/use-htaccess/.

If you want to enable .htaccess usage, you would need to set it to AllowOverride All in /opt/bitnami/apache2/conf/bitnami/bitnami.conf file:

<VirtualHost _default_:80>
  DocumentRoot "/opt/bitnami/apache2/htdocs"
  <Directory "/opt/bitnami/apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All <---- HERE
    <IfVersion < 2.3 >
      Order allow,deny
      Allow from all
    </IfVersion>
    <IfVersion >= 2.3 >
      Require all granted
    </IfVersion>
  </Directory>

Restart Apache after applying your changes.

Regards

over 4 years ago · Santiago Trujillo Denunciar

0

  • Open Terminal
  • type ls (you'll see a list of directories & files)
  • type cd apps/wordpress/conf
  • type ls
  • type nano htaccess.conf

htaccess file will open. edit it as per your requirements and press ctrl + x to exit be sure to press y to save the changes. reboot the lightsail instance. done.

over 4 years ago · Santiago Trujillo Denunciar

0

if you've done configuring the SSL configuration then add the redirect option on your vhost file which you must have created for the website to view online.
Whatever modification you do to your server please make sure to create back up and always try to create new modification files. So you could use the redirect option on you app's virtual host file.

<VirtualHost *:80> 
    ServerName your_domain_name.com
    ServerAlias www.your_domain_name.com
    Redirect permanent / https://www.your_domain_name.com/
    DocumentRoot /opt/bitnami/apache2/htdocs 
    <Directory "/opt/bitnami/apache2/htdocs">
          Options -Indexes +FollowSymLinks -MultiViews 
      AllowOverride All 
      Require all granted
  </Directory>
</VirtualHost>

Hope this works for you.

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