Burak Çalışkan

FreeBSD nginx site root

  • 7 sene önce, Burak Çalışkan tarafından yazılmıştır.
  • FreeBSD nginx site root için yorumlar kapalı
  • FreeBSD,Genel

Dosya Yolu:  /usr/local/etc/nginx/nginx.conf

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;
}
}

server {
listen 80;
server_name tenuronder.com www.tenuronder.com;
root /usr/local/www/tenuronder.com;
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/tenuronder.com;
}

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;
}
}

server {
listen 80;
server_name burakcaliskan.com www.burakcaliskan.com;
root /usr/local/www/burakcaliskan.com.tr;
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/burakcaliskan.com.tr;
}

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;
}
}

}