diff --git a/ansible/group_vars/all b/ansible/group_vars/all
index eaef961815f6ce7dfb7bdd0957acca2a77f512b2..7055312d9b05399ad03af400131849912e764840 100644
--- a/ansible/group_vars/all
+++ b/ansible/group_vars/all
@@ -73,3 +73,5 @@
     - {"name": "gpfs4", "host": "login001", "default": True }
     - {"name": "gpfs5", "host": "login002", "default": False }
 
+# account app
+  account_app_port: 8000
diff --git a/ansible/roles/rewrite_map/tasks/main.yaml b/ansible/roles/rewrite_map/tasks/main.yaml
index d9905652064c1fe824ab69a23b6620f36e9c1004..8b08eb62de1e987816f386bb50bdd2d8aec221e5 100644
--- a/ansible/roles/rewrite_map/tasks/main.yaml
+++ b/ansible/roles/rewrite_map/tasks/main.yaml
@@ -15,6 +15,12 @@
       RewriteCond %{HTTP:REMOTE_USER} '([a-zA-Z0-9_.+-]+)@uab.edu$' [OR]
           RewriteCond %{HTTP:REMOTE_USER} 'urn:mace:incommon:uab.edu!https://uabgrid.uab.edu/shibboleth!(.+)$'
 
+- name: Replace account app port in Apache configuration
+  ansible.builtin.replace:
+    path: /etc/httpd/conf.d/front-end.conf
+    regexp: "account-app:8000"
+    replace: "account-app:{{ account_app_port }}"
+
 - name: Restart httpd services
   ansible.builtin.service:
     name: httpd