The mysql user cannot use ports below 1024 because these are reserved for the root user.Apache, on the other hand, can use port 80. Apache runs as root before it runs as Apache and thus it can use port 80. It can even listen to port 81 and any other port.However, when I tried to get Apache to listen on port 79, it did not work. I tried to listen on port 1 too, and that did not work either.When I change the Apache settings, Apache restarts just fine, but it doesnt actually work on the web.Can I use port 1 on the web?
How can I set up Apache to use port 1 and other ports below 80?
apache httpd;privileges
I'm going to use Firefox as an example, because its open source and easy to find the information for, but this applies (probably with slightly different lists of ports) to other browsers, too.In August 2001, CERT issued a vulnerability note about how a web browser could be used to send near-arbitrary data to TCP ports chosen by an attacker, on any arbitrary IP address. This could be used to, for example, send emails which would appear to come from the user running the web browser. In order to mitigate this, Mozilla (as well as many other vendors) blocked Firefox from accessing certain ports. The two ports you tried, 79 and 1, happen to be on the blocklist. The source contains the full list of blocked ports. You can (on your browser) override this list using the preferences network.security.ports.banned.override and network.security.ports.banned. This isn't useful on the Internet in general, as you'd have to convince everyone who might visit your site to go to about:config and change them.(Note: Current versions of Firefox will give an error message explaining that if you try to browse to a site on a blocked port.)In general, there is little reason to use additional HTTP ports, at least externally. If you have to, prefer traditional extra ports like 8080, 8000, etc. that are far less likely to be blocked or at least ones outside of the IANA-assigned system ports range (0-1023). See the IANA port registry for more details.