app-service-quickstart-dock.../drupal-nginx-fpm/0.1/nginx.conf

67 строки
2.1 KiB
Nginx Configuration File

worker_processes auto;
pid /var/run/nginx.pid;
daemon off;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log off;
tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 1;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
server {
listen 80;
server_name www.example.com;
error_log /home/LogFiles/error.log warn;
root /home/site/wwwroot;
index Default.htm Default.html index.html index.htm hostingstart.html;
# Make site accessible from http://localhost/
server_name _;
sendfile on;
location ~* \.(js|css|png|jpg|jpeg|gif|ico|mp3|html)$ {
expires 1d;
}
location / {
index index.html index.php;
try_files $uri $uri/ @rewrite;
expires max;
}
location @rewrite{
rewrite ^/(.*)$ /index.php?q=$1;
}
location ~ .php$ {
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 3600;
fastcgi_read_timeout 3600;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}