Skip to main content

Web Servers & Tools

Web Servers & Tools

How to Install Nginx on CentOS 8 and Configure Nginx with Multiple PHP Versions

In this guide, we’ll discuss how to install Nginx on a CentOS 8 server and how to run Multiple PHP Versions on one server using nginx and PHP-FPM on CentOS 8

After installing CentOS 8 you will have the root user an you might have {another user} that you created during the installation, anyway and in both cases we will not use any user from those users an we will start create our own {web user}

Use Token to use Github

Use Token to use Github

1- first create your token from this link "https://github.com/settings/tokens"

2- you need to add the token into the repo URL like this

git remote set-url origin https://{githubtoken}@github.com/{username}/{repositoryname}.git

while 

While cloning:

git clone https://{username}:{githubtoken}@github.com/{username}/{repositoryname}.git

 

 

Block Some Bots using htaccess

A lot of time we get many requests from some bots we do not need here you can block them from htaccess file 

 

<IfModule mod_setenvif.c>
  SetEnvIfNoCase User-Agent (SemrushBot|Semrush|python-requests|sqlmap|wordpress|apachebench) bad_user_agents

  Order Allow,Deny
  Allow from all
  Deny from env=bad_user_agents
</IfModule>