Is it possible to configure a Rewrite Rule in AWS without changing the directories?

1

I have a small problem since I set up AWS. The fact is that it came a little prepared when it fell into my hand.

It is configured to save in the domain.com / site / wordpress , and when trying to access this link only by domain.com.br I end up falling on the AMI Linux Test Page. >

Is it possible to create a Rewrite Rule for the domain.com to point to within wordpress? Changing the place directories now would be a bit more complicated, but I also accepted some help.

Consider that I've tried some Rewrites, but none of them definitely worked.

    
asked by anonymous 14.11.2015 / 15:41

1 answer

0

I suppose you are using ubuntu and apache2.4, so possibly your virtual host configuration files are stored in /etc/apache2/sites-enabled/yourdomain.com.conf Edit your .conf file with the data below. Just note that the path in DocumentRoot and Directory Path should be the corresponding paths in your server.

<VirtualHost *:80>
  ServerAdmin [email protected]
  DocumentRoot /var/www/html/dominio.com.br/site/wordpress
  ServerName   dominio.com.br
  ServerAlias  www.dominio.com.br
  <Directory /var/www/html/dominio.com.br/site/wordpress>
    Options +ExecCGI +FollowSymlinks -Indexes
    Require all granted
  </Directory>
</VirtualHost>
    
15.11.2015 / 14:16