Configure Apache to listen on different port than 80

Sometimes it is quite easy for hackers to guess and attack your servers, to Avoid this kind of situation you can customize your application to work on different ports than well-defined port.
We can configure apache web server – httpd service to listen on different ports than the port 80, via Listen directive. By default httpd listens on TCP port 80. To configure different ports, open file /etc/httpd/conf/httpd.conf and modify the Listen directive tells the server to accept incoming requests on the specified port


# vi /etc/httpd/conf/httpd.conf

Search for "Listen 80",
If you want apache to listen on port 8080 change it as below
Listen 8080
Save and close the file.

Restart httpd:

# /etc/init.d/httpd restart

Note: You must have root privileges to change configuration file.

Configure Apache to listen on different port than 80 Configure Apache to listen on different port than 80 Reviewed by Unknown on December 21, 2016 Rating: 5

No comments:

Get Your Business Online Now


Powered by Blogger.