Burak Çalışkan

FreeBSD nginx.conf

  • 6 sene önce, Burak Çalışkan tarafından yazılmıştır.
  • FreeBSD nginx.conf için yorumlar kapalı
  • FreeBSD,Hosting,Web

/usr/local/etc/nginx/nginx.conf içindekiler,

load_module /usr/local/libexec/nginx/ngx_mail_module.so;
load_module /usr/local/libexec/nginx/ngx_stream_module.so;

#user nobody;
user www;
worker_processes 1;
error_log /var/log/nginx/error.log info;

# This default error log path is compiled-in to make sure configuration parsing
# errors are logged somewhere, especially during unattended boot when stderr
# isn’t normally logged anywhere. This path will be touched on every nginx
# start regardless of error log location configured here. See
# https://trac.nginx.org/nginx/ticket/147 for more info.
#
#error_log /var/log/nginx/error.log;
#

#pid logs/nginx.pid;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

access_log /var/log/nginx/access.log;

sendfile on;
keepalive_timeout 65;

server {
listen 80;
server_name linoxide.com www.linoxide.com;
root /usr/local/www/nginx;
index index.php index.html index.htm;

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

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}
}