ini NGINX - PHP

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini NGINX - PHP相关的知识,希望对你有一定的参考价值。

## NGINX PHP
#######################################################
server {
        listen 80 default_server;
        listen [::]:80 default_server;

        # SSL configuration
        #
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;

        root /var/www/html/tg4.com.br;

        index index.html index.php;

        server_name www.tg4.com.br tg4.com.br;

        location / {
                try_files $uri/ /index.php?$args;
        }

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/run/php/php7.1-fpm.sock;
                fastcgi_index index.php;
                include fastcgi.conf;
        }

        location ~* \.(js|css|png|jpg|jpeg|gif|ico|eot|otf|ttf|woff)$ {
                add_header Access-Control-Allow-Origin *;
                access_log off; log_not_found off; expires 30d;
        }

        location = /robots.txt { access_log off; log_not_found off; }
        location ~ /\. { deny all; access_log off; log_not_found off; }


        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #       deny all;
        #}
}

以上是关于ini NGINX - PHP的主要内容,如果未能解决你的问题,请参考以下文章

ini NGINX - PHP

ini Nginx,PHP和CORS。

ini nginx_php

ini CONF:Linux,Nginx,PHP,Php-fpm

ini php_fpm_nginx.conf

ini Nginx的でPHP-FPMな时