How do i install nginx on ubuntu?
-
There are a number of platforms that nginx run on. The best place to start with open source nginx is the nginx wiki: https://www.nginx.com/resources/wiki/
This article focuses on Ubuntu installation but all the nginx installation documentation is at: https://www.nginx.com/resources/wiki/start/topics/tutorials/install/
Add the repository ubuntu into /etc/apt/sources.list.d/nginx.list
For x64
deb [arch=amd64] http://nginx.org/packages/ubuntu/ bionic nginx deb-src http://nginx.org/packages/ubuntu/ bionic nginx
For i386
deb http://nginx.org/packages/ubuntu/ bionic nginx deb-src http://nginx.org/packages/ubuntu/ bionic nginx
Update the package index files from their sources.
$ sudo apt-get update
Install the nginx package.
$ sudo apt-get install nginx
Go to the browser: http://localhost and you should see the test welcome message:
© Lightnetics 2024