Facebook X (Twitter) Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook X (Twitter) Instagram
    TecAdmin
    You are at:Home»Web Servers»Nginx»How To Install Nginx on Debian 8 (Jessie)

    How To Install Nginx on Debian 8 (Jessie)

    By RahulApril 30, 20182 Mins Read

    Nginx is another most popular web server than Apache HTTP Server. It is used by a large number of popular websites word wide. This web server is highly useful for heavy traffic websites. This tutorial will help you to install Nginx on Debian 8 Jessie using apt-get.

    1. Prerequisites

    To install Nginx on Debian 8, you must have root or sudo privileged user access to your system. For the remote systems can use ssh command or putty for Windows user to login.

    ssh root@debian9
    

    2. Install Nginx on Debian 8

    The Nginx latest packages are available under default repositories for all Ubuntu’s versions, You can directly install them by running following commands

    sudo apt-get update
    sudo apt-get install nginx
    

    After installation of Nginx service, run below command to check the status of Nginx service.

    sudo systemctl status nginx
    
    ● nginx.service - A high performance web server and a reverse proxy server
       Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
       Active: active (running) since Mon 2018-04-30 03:54:27 UTC; 2s ago
         Docs: man:nginx(8)
      Process: 5396 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      Process: 5394 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
     Main PID: 5398 (nginx)
        Tasks: 2 (limit: 4915)
       CGroup: /system.slice/nginx.service
               ├─5398 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
               └─5399 nginx: worker process
    

    3. Configure Firewall

    Most probably you are using IPTABLES for Debian system. The following command will allow port 80 (HTTP).

    sudo iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
    

    You can use the same for port 443 (HTTPS). If you somehow used ufw firewall use following:

    sudo ufw allow 80/tcp
    

    4. Manage Nginx Service

    The systemd users use systemctl commands to manage their Nginx service on Debian 8 Jessie. The below commands will stop, star, and restart nginx service.

    sudo systemctl stop nginx
    sudo systemctl start nginx
    sudo systemctl restart nginx
    

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Using the Apt Package Manager on Debian-based Systems

    Configure CORS in NGINX

    How to Enable CORS in Nginx

    How to Setup DKIM (DomainKeys) with Postfix

    A Step-by-Step Guide to Installing OpenDKIM with Postfix on Ubuntu – Unleash the Power of DKIM!

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Using .env Files in Django
    • Using .env File in FastAPI
    • Setting Up Email Notifications for Django Error Reporting
    • How to Enable Apache Rewrite (mod_rewrite) Module
    • What are Microservices?
    Facebook X (Twitter) Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.