Skip to content

Instantly share code, notes, and snippets.

@cs3b
Created February 22, 2010 13:45
Show Gist options
  • Save cs3b/311078 to your computer and use it in GitHub Desktop.
Save cs3b/311078 to your computer and use it in GitHub Desktop.
Nginx on Dev Machine
./configure --prefix='/opt/nginx' --with-pcre='/tmp/pcre-7.8' --add-module='/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/passenger-2.2.7/ext/nginx' --with-http_ssl_module --with-http_stub_status_module --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf
server {
listen 80;
server_name hp.mc;
root /home/mc/projects/earworks/hp/public;
passenger_enabled on;
rails_env development;
}
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
passenger_root /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/passenger-2.2.8;
passenger_ruby /opt/ruby-enterprise-1.8.7-2009.10/bin/ruby;
#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 logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
include railsapp/*;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment