Wildfly use port 8080 by default. How to change this to 80? So that I don't have to always add colon 8080?

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

In order to get 80, should I use port-offset -8000?


3 Answers 3


You need to run a process as a privileged user to use port 80 and using 8080 (the 'alternate' port) is a common workaround since its greater than 1024. There's a few ways around this.

Iptables is one solution - a rule like sudo iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 8080 would work here.

Alternately set up a proxy like ngnix to do it. Ngnix would start as root, and drop down to a regular user. Then set up appropriately, it would forward ports.

enter image description here


You can do it from UI also. browse and login to wildfly, under General Configuration Click on socket binding. Click on view> under option. Select HTTP and click edit. Change ${jboss.http.port:8080} to ${jboss.http.port:80}


Port offsets apply to all of the socket bindings, so no, that's not what you want. It sounds like you want to change the socket binding for just http requests, in which case, you would...


      <socket-binding name="http" port="8080"/>


      <socket-binding name="http" port="80"/>

Per "Socket Binding Groups" section - https://docs.jboss.org/author/display/WFLY8/Interfaces+and+ports

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.