Why is the web interface port 8006 hard-coded?

Jan 15, 2021
2
0
6
70
I have a situation where I need to change the port of the PMG web interface. But there is no configuration option for this.
Finally I found out that port 8006 is hard-coded in the pmgproxy sources.

This is just horrible! Why?

I have to hack into the source every time I upgrade.
 
That's not the answer to my question.
I wanted to know why the hell the port is hard-coded. It looks like code from someone who was still learning Perl.

The installation of a reverse proxy and all the other fiddling would be unnecessary if the port wold be configurable.
Or is port 8006 a dogma that the user must not violate under any circumstances?

Best regards,
hjb
 
Hello,

I am not sure why. I think it is because other services/plugins expect the PVE/PMG API to be on port 8006 and PBS to be on port 8007.
What I can say is that hardcoding a port is a common design choice to ensure that everything related uses the same port.
In addition, nginx can be used to load balance and improve security, scalability, and flexibility.
 
Last edited: