Hi. I have an Apache Server with a LAMP Stack running on Ubuntu 14.04.
It’s all set up well, but I also need to monitor messages coming in from Port 22. I’ve opened the port using ufw, but I don’t know how to listen to it.
Any help will be very much appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Port 22 is generally used for SSH traffic. If you configure another application besides the SSH daemon to listen on that port, make sure to configure SSH to listen on a different port first. If not, you may lose access to the server.
If you really want to configure Apache to listen to port 22, you must add or edit a VirtualHost to do so as well as configure a Listen directive. The port that Apache will respond on is configured
Listen 22
<VirtualHost *:22>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
For more information on configuring Apache, check out:
To learn more about SSH, see:
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.