ptut-virtenv/virtual/etc/nginx/nginx.conf

60 lines
1.2 KiB
Nginx Configuration File

user nginx;
worker_processes 5;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
}
http {
include mime.types;
# include fastcgi.conf;
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 /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
server_names_hash_bucket_size 128;
keepalive_timeout 65;
gzip on;
# virtual host
server{
listen 80 default_server;
listen [::]:80 default_server;
server_name ptut.com www.ptut.com;
root /vhost/public_html;
index index.php;
error_log /var/log/nginx/ptut.error.log;
access_log /var/log/nginx/ptut.access.log main;
location / {
try_files $uri $uri/ /index.php?url=$uri;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
}
}
}