Heim > Backend-Entwicklung > PHP-Tutorial > Jede Art von Nginx-PHP (.py) wird als PHP-Konfigurationsmethode interpretiert

Jede Art von Nginx-PHP (.py) wird als PHP-Konfigurationsmethode interpretiert

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Freigeben: 2016-08-08 09:27:15
Original
1111 Leute haben es durchsucht

Nehmen Sie die .py-Datei als Beispiel

1. Konfigurieren Sie den Speicherort in ngxin.conf

...
server {
    listen       80 default;
    server_name  _;
        index index.html index.htm index.php;
        root /alidata/www/default;
        <span style="color:#ff0000;">location ~ .*\.(php|php5|py)?$</span>
        {
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi.conf;
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
                expires 30d;
        }
        location ~ .*\.(js|css)?$
        {
                expires 1h;
        }
        access_log  /alidata/log/nginx/access/default.log;
}
...
Nach dem Login kopieren

2. Ändern Sie die Konfigurationsdatei php-fpm.conf

security.limit_extensions = .php .php3 .php4 .php5 .py

Das Obige stellt die Interpretation jeder Art von Nginx-PHP in die PHP-Konfigurationsmethode vor, einschließlich Aspekten des Inhalts. Ich hoffe, dass es für Freunde hilfreich sein wird, die an PHP-Tutorials interessiert sind.

Verwandte Etiketten:
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Aktuelle Ausgaben
PHP-Datenerfassung?
Aus 1970-01-01 08:00:00
0
0
0
PHP-Erweiterung intl
Aus 1970-01-01 08:00:00
0
0
0
Wie man PHP gut lernt
Aus 1970-01-01 08:00:00
0
0
0
Mehrere PHP-Versionen
Aus 1970-01-01 08:00:00
0
0
0
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage