March 30, 2021
Estimated Post Reading Time ~

Port Warts

When you first fire up most java web applications, they come with a port wart.

http://yourmom.com:4502

With AEM, an author instance binds to 4502, and a publish instance binds to 4503. You can manually change these ports to 80, but at the expense of several problems. By default, only root can bind to ports below 1024. Our options are as follows:

  1. Use IPTables to redirect port 80 to port 4502 / 4503
  2. Run the apps as root (not really an option)
  3. Setup Apache Web Server as a reverse proxy
  4. Other crazy options not worth considering

We run Stash internally with an Apache reverse proxy and it works extremely well. This has several advantages:

  1. Declare forwarding on a domain name basis
  2. Most sysadmins will be better at SSL on Apache than they would on AEM
  3. Proven to work well
  4. Secure

After about 2 minutes, I had Apache installed, and setup with a reverse proxy. Boom. No more port wart.

<VirtualHost *:*> 
    ProxyPreserveHost On ProxyPass / http://localhost:4502/ connectiontimeout=5         timeout=300 
    ProxyPassReverse / http://localhost:4502/ 
    ServerName dev-author-01.yourmom.com 
</VirtualHost>


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.