{"id":18610361,"url":"https://github.com/ivikramsahu/install-nginx-on-linux-centos8","last_synced_at":"2025-10-12T03:10:58.174Z","repository":{"id":215870153,"uuid":"218791726","full_name":"ivikramsahu/install-nginx-on-linux-centos8","owner":"ivikramsahu","description":"installing and running nginx on centos 8","archived":false,"fork":false,"pushed_at":"2019-11-01T06:17:13.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-14T06:16:41.566Z","etag":null,"topics":["nginx","nginx-server","webserver"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivikramsahu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-10-31T14:58:06.000Z","updated_at":"2019-11-01T06:17:15.000Z","dependencies_parsed_at":"2024-01-07T04:14:29.792Z","dependency_job_id":"dd84ddc8-a43b-4c66-a5b6-76066734c358","html_url":"https://github.com/ivikramsahu/install-nginx-on-linux-centos8","commit_stats":null,"previous_names":["ivikramsahu/install-nginx-on-linux-centos8"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ivikramsahu/install-nginx-on-linux-centos8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivikramsahu%2Finstall-nginx-on-linux-centos8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivikramsahu%2Finstall-nginx-on-linux-centos8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivikramsahu%2Finstall-nginx-on-linux-centos8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivikramsahu%2Finstall-nginx-on-linux-centos8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivikramsahu","download_url":"https://codeload.github.com/ivikramsahu/install-nginx-on-linux-centos8/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivikramsahu%2Finstall-nginx-on-linux-centos8/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010166,"owners_count":26084691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nginx","nginx-server","webserver"],"created_at":"2024-11-07T03:09:29.804Z","updated_at":"2025-10-12T03:10:58.143Z","avatar_url":"https://github.com/ivikramsahu.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"![how to install nginx on centos 8 , linux , rhel 8](https://i.imgur.com/zpB4yRm.png)\n\n### URL : https://vikram-sahu.github.io/install-nginx-on-linux-centos8/\n\n## Introduction \n\nNginx is an open-source web server with high-performance HTTP and reverse proxy. Majority of largest sites on the internet trust Nginx for handling tons of load. \n\n## Usage\n\n* Standalone web server\n* Load balancer\n* Content cache\n* Reverse proxy for both HTTP and non-HTTP servers\n\nAs per benchmarks Nginx is capable of handling larger number of concurrent connection with smaller memory footprint per connection as compared to Apache.\n\n## Prerequisites\n\n* Make sure you have `sudo` privileges \n* Make sure Apache is not running or any other application using port 80 or 443.\n\n## Installation\n\n1) Installing nginx on centos 8\n\n   `sudo yum install -y nginx`\n   \n   **OR**\n   \n   simply type `nginx` on the terminal \n   \n   ```bash\n   [root@localhost ~]# nginx\n   bash: nginx: command not found...\n   Install package 'nginx' to provide command 'nginx'? [N/y] y\n   \n   * Waiting in queue... \n   * Loading list of packages.... \n   The following packages have to be installed:\n   nginx-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64\tA high performance web server and reverse proxy server\n   nginx-all-modules-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch\tA meta package that installs all available Nginx modules\n   nginx-mod-http-image-filter-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64\tNginx HTTP image filter module\n   nginx-mod-http-perl-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64\tNginx HTTP perl module\n   nginx-mod-http-xslt-filter-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64\tNginx XSLT module\n   nginx-mod-mail-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64\tNginx mail modules\n   nginx-mod-stream-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64\tNginx stream modules\n   Proceed with changes? [N/y] y\n\n\n   * Waiting in queue... \n   * Waiting for authentication... \n   * Waiting in queue... \n   * Downloading packages... \n   * Requesting data... \n   * Testing changes... \n   * Installing packages... \n\n   ```\n\n    when you type `y` + enter \n    \n    It will automatically install all dependencies \n    \n2)  Once you have installed nginx successfully, trigger the below command on terminal.\n\n    ```bash\n    sudo systemctl enable nginx\n    sudo systemctl start nginx\n    ```\n    \n3) Above command will enable and start the service you can check and verify the same using the below. \n\n    `sudo systemctl status nginx`\n    \n     **OR**\n     \n     `sudo service nginx status`\n     \n4) Output on success and failure will be shown below\n\n    **ON Success**\n  \n      ```bash\n      ● nginx.service - The nginx HTTP and reverse proxy server\n      Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)\n      Active: active (running) since Sun 2019-10-31 21:09:32 IST; 5min ago\n      ```  \n   \n    **ON Failure**\n   \n      ```bash\n      [root@localhost ~]# systemctl status nginx \n      ● nginx.service - The nginx HTTP and reverse proxy server\n      Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)\n      Active: failed (Result: exit-code) since Thu 2019-10-31 21:11:58 IST; 9s ago\n      ```\n    \n##  Firewall Restriction\n\ncentos 8 has its predefined firewalld service with rules for HTTP {80} or HTTPS {443}\n\n  ```bash\n  sudo firewall-cmd --permanent --zone=public --add-service=http\n  sudo firewall-cmd --permanent --zone=public --add-service=https\n  sudo firewall-cmd --reload\n  ```\n\nif it already configure you will getting below alerts\n\n  ```bash\n  [root@localhost ~]# sudo firewall-cmd --permanent --zone=public --add-service=http\n  Warning: ALREADY_ENABLED: http\n  success\n  [root@localhost ~]# sudo firewall-cmd --permanent --zone=public --add-service=https\n  Warning: ALREADY_ENABLED: https\n  success\n  [root@localhost ~]# sudo firewall-cmd --reload\n  success\n  ```\n\n## http://localhost/\n\nfinally you can redirect to your http://Your-IP or http://localhost\n\n![nginx-localhost-linux](https://i.imgur.com/RWMtzwi.png)\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivikramsahu%2Finstall-nginx-on-linux-centos8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivikramsahu%2Finstall-nginx-on-linux-centos8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivikramsahu%2Finstall-nginx-on-linux-centos8/lists"}