Skip to content

Instantly share code, notes, and snippets.

@ruo91
Last active December 24, 2015 23:08
Show Gist options
  • Save ruo91/6877374 to your computer and use it in GitHub Desktop.
Save ruo91/6877374 to your computer and use it in GitHub Desktop.
nginx example conf
- nginx.conf 설정파일
[root@localhost ~]# vim /etc/nginx/nginx.conf
user nobody;
pid logs/nginx.pid;
error_log logs/error.log;
access_log off;
worker_processes 2;
events {
worker_connections 1024;
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
types_hash_max_size 2048;
server_names_hash_bucket_size 64;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
## TCP options
tcp_nodelay on;
tcp_nopush on;
# Virtualhost
include /etc/nginx/sites-enabled/*;
include /etc/nginx/conf.d/*.conf;
}
- /etc/nginx/sites-enabled/KDA 설정파일
[root@localhost ~]# vim /etc/nginx/sites-enabled/KDA
server {
listen 80;
server_name kda-developers.org;
root /home/kda/public_html;
index index.html;
# Logs
access_log logs/kda-developers.org.access.log;
error_log logs/kda-developers.org.error.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment