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:

    0_1547383469054_551b0c33-a71c-436b-9473-4053dad2b269-image.png


Log in to reply
 

© Lightnetics 2024