Nginx
Cors Origin nginx code
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST';
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}
Install Certbot on nginx with Centos 8
Step 1 — Installing the Certbot Let’s Encrypt Client
To use Let’s Encrypt to obtain an SSL certificate, you first need to install Certbot and mod_ssl
, an Apache module that provides support for SSLv3 encryption.
Magento 2 how to configure Nginx to allow execute phpinfo.php files in root folder
Go to the Nginx configuration then you need to edit the line similar to this line
location ~ (index|get|static|report|404|503)\.php$ {
to be like this
location ~ (index|get|static|report|404|503|phpinfo)\.php$ {
then restart Nginx