Remove an Available Site On an Ubuntu Server Running Nginx
To remove an available site on an Ubuntu server running nginx, you can use the following steps:
- Open a terminal on your Ubuntu server.
Change to the directory where the nginx configuration files are stored. The default location is /etc/nginx/.
List the available sites on your server using the command:
Remove the desired site from the available sites folder using the command:
sudo rm sites-available/example.com
Check if the site is enabled:
If the site is enabled, remove the symbolic link to the site by running the command:
sudo rm sites-enabled/example.com
Verify the configuration with the following command:
sudo nginx -t
Finally, restart the nginx server to apply the changes:
sudo service nginx restart
Note: Above commands assume the site you want to remove is named "example.com", you need to replace it with the actual name of the site you want to remove.