Created
May 20, 2015 01:03
-
-
Save 666threesixes666/8c402312c8cc47cd0423 to your computer and use it in GitHub Desktop.
tengine conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
========/etc/tengine/tengine.conf | |
user tengine tengine; | |
worker_processes 4; | |
worker_rlimit_nofile 64000; | |
error_log /var/log/tengine/error_log info; | |
events { | |
worker_connections 16000; | |
multi_accept on; | |
use epoll; | |
} | |
dso { | |
load ngx_http_charset_filter_module.so; | |
load ngx_http_fastcgi_module.so; | |
load ngx_http_rewrite_module.so; | |
load ngx_http_uwsgi_module.so; | |
load ngx_http_access_module.so; ## added because you want most likely use allow & deny on certain positions | |
} | |
http { | |
log_format main | |
'$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $bytes_sent ' | |
'"$http_referer" "$http_user_agent" ' | |
'"$gzip_ratio"'; | |
access_log off; | |
disable_symlinks off; | |
ignore_invalid_headers on; | |
server_tokens off; | |
keepalive_timeout 20; | |
client_header_timeout 20; | |
client_body_timeout 20; | |
reset_timedout_connection on; | |
send_timeout 20; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
include /etc/tengine/mime.types; | |
default_type application/octet-stream; | |
charset UTF-8; | |
gzip on; | |
gzip_vary on; | |
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js image/x-icon image/bmp; | |
include /etc/tengine/sites-enabled/*; | |
} | |
========= /etc/tengine/sites-available/localhost | |
#passenger_root /usr/libexec/passenger/locations.ini; | |
#passenger_ruby /usr/bin/ruby; | |
server { | |
listen 127.0.0.1; | |
server_name localhost; | |
access_log /var/log/tengine/localhost.access_log main; | |
error_log /var/log/tengine/localhost.error_log info; | |
#root /usr/share/tengine/html; | |
index index.cgi index.htm index.html index.php; | |
# root /home/mkultra/ror/public; | |
root /home/mkultra/flask/public; | |
# root /home/mkultra/node/public; | |
# root /var/www/localhost/htdocs/flask; | |
# passenger_enabled on; | |
# passenger_app_env development; | |
location /python/ { | |
uwsgi_pass 127.0.0.1:4567; | |
include uwsgi_params; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
} | |
# SSL example | |
#server { | |
# listen 127.0.0.1:443; | |
# server_name localhost; | |
# ssl on; | |
# ssl_certificate /etc/ssl/tengine/tengine.pem; | |
# ssl_certificate_key /etc/ssl/tengine/tengine.key; | |
# access_log /var/log/tengine/localhost.ssl_access_log main; | |
# error_log /var/log/tengine/localhost.ssl_error_log info; | |
# root /usr/share/tengine/html; | |
# index index.cgi index.htm index.html index.php; | |
#} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment