I'm using Ubuntu 12.04
I tried to change my default apache2 port from 80 to 8085
I edited /etc/apache2/ports.conf
I edited line Listen 80
to Listen 8085
then restarted my apache service
then to test this in browser I putted http://localhost:8085
The result is 404 Not Found
then I opened terminal and ran
netstat -tulpn | grep 8085
o/p is:
tcp 0 0 0.0.0.0:8085 0.0.0.0:* LISTEN
Am I doing something wrong? or Am I missing something?
Thanks and regards!
By default, the Apache webserver is instructed to listen and bind on port 80.0 for incoming connections. If you opt for a TLS setup, the server listens on port 443 for stable connections.
The ports configuration file is located at /etc/apache2/ports. conf . It is a tiny configuration file with just a few lines of configuration.
In Linux based operating systems, The default SSH port is 22. But the good news is, we can change SSH port in Ubuntu to avoid getting unwanted login attacks by bots who attack on default ports. It's not that we can completely stop any kind of attack just by changing the SSH port, but it provides some level of security.
I would almost have to guess, given your configuration is correct, that you needed to just to reload and restart apache:
sudo service apache2 reload
sudo service apache2 restart
If not, I believe why this has gone unanswered is there was not enough basic info posting like "/var/log/apache2/error.info" output or further explanation, along with providing us with what you had done prior as far as configuration.
Hope you got it handled and did not give up!
=^)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With