Skip to content

Commit

Permalink
Add vagrant condition for render pages
Browse files Browse the repository at this point in the history
It is possible to directly access some main
pages by writing the URL in the browser
(e.g. Active users, Stage users, Hosts,
etc.). But is not possible to access
subsections within those main pages (E.g.
active users settings, 'Is a member of'
section, etc.).

The current solution adds these lines to
the `Vagrantfile` to rewrite the rules
that make reference to the components. This
also works alongside with Webpack.

Steps to test it:
- If you have a vagrant instance running up already:
  - Access your vagrant instance via `vagrant ssh`
  - Copy the solution lines and add them to
the file located in `/etc/httpd/conf.d/ipa.conf`
  - Restart httpd: `systemctl restart httpd`
- If you don't have any instance running:
  - Run `vagrant up` and the `Vagrantfile` file
will take the new configuration

Signed-off-by: Carla Martinez <[email protected]>
  • Loading branch information
carma12 committed May 20, 2024
1 parent 7ec1f0b commit 23c2600
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ Vagrant.configure("2") do |config|
Satisfy Any
Require all granted
RewriteEngine On
RewriteRule ^(.*)/js/(.*)\.(js|map)$ js/$2.$3 [L]
RewriteRule ^(.*)/public/images/(.*)$ public/images/$2 [L]
RewriteRule ^(.*)/(.*)\.(css|ico|woff2)$ $2.$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]
</Directory>
Expand Down

0 comments on commit 23c2600

Please sign in to comment.