1

I have a running EC2 instance in Linux (Apache server). I recently cloned another repository to my EC2 instance. For example : In var/wwww/html there are two folders

  1. front(already running)
  2. frontend(newly cloned)

I wanted the instance to listen, folder frontend

Methods tried :

  1. changed root directory in /etc/apache2/sites-enabled/000-default.conf to
 ServerAdmin webmaster@localhost
   DocumentRoot /var/www/html/frontend/dist
   <Directory "/var/www/html/frontend/dist">
      FallbackResource /index.html
   </Directory>

and restarted Apache

  1. Tried stopping the instance and started again
  2. tried rewrite mode by sudo a2enmod rewrite - shows rewrite mode already enabled
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
aseel
  • 431
  • 5
  • 8
  • Did you also make changes in `/etc/apache2/apache2.conf` file? – Arpit Jain May 01 '23 at 14:48
  • In `apache2.conf` there is `allow override` for `/var/www/html` it is changed from `none` to `All` . nothing related to document root is there – aseel May 02 '23 at 09:24
  • I think You need to change `/var/www/html` to your preferred directory as you have changed in `000-default.conf`. – Arpit Jain May 02 '23 at 10:22
  • I found the issue why the root directory change is not reflecting. I installed SSL for my domain ,so i have to change root file inside SSL conf file also ( in `000-default-ssl.conf` ). Thank you @ArpitJain really appreciate your efforts. – aseel May 07 '23 at 08:39

0 Answers0