Stop Website on Ubuntu: Quick Guide
To shut down the website set up on the Ubuntu system, you can follow these steps:
- Access the server: Log in to the Ubuntu server using SSH or other remote login tools.
- Stop Website Service: Use the following commands to stop the website service. You can choose different commands based on the specific type of website service.
- If Nginx is being used as the web server, you can stop the Nginx service with the following command: sudo systemctl stop nginx
- If you are using Apache as a web server, you can use the following command to stop the Apache service: sudo systemctl stop apache2.
- To shut down a website: If a website is running on a specific port, you can stop website access by modifying firewall rules or closing the corresponding port.
- Delete website files: You can delete website files and directories as needed to free up server space.
- To exit the server: Finally, use the following command to end the server login session:
- leave
After completing the steps above, your website has stopped running and you have successfully logged out of the Ubuntu server.