To install and configure Nginx on Ubuntu 24.10, follow these steps:
Step 1 : Run the following command to ensure your system is up to date:
Step 2 : Install Nginx using:
Step 3 : Allow Nginx through the firewall:
Step 4 : Verify if Nginx is running:
Step 5 : Create a directory for your site and an index file:
Step 6 : Set up a configuration file for your domain:
Add the following content:
Step 7 : Link your configuration to enable the site:
Step 8 : Test the Nginx configuration for errors:
Step 9 : Restart Nginx to apply the changes:
Step 10 : Open your browser and go to http://example.com
to confirm everything is working.
Congratulations! You have successfully installed and configured Nginx on Ubuntu 24.10.