Upgrading from 0.7.19?

Hi guys, I’ve been running very old 0.7.19 nginx with virtual host
configuration for ages now with nginx.conf listed below. But it’s time
to upgrade to 0.8.20 so what’s the best way to do this AND be able to
backup 0.7.19 nginx (which specific files) so I could ASAP switch back
to 0.7.19 to get things running if I mess up 0.8.20 install ?

Also not sure if my settings in conf files below are correct for 0.8.20
syntax/format etc wise ?

Any help is appreciated :slight_smile:

nginx.conf

user nobody nobody;
worker_processes 2;
#worker_cpu_affinity 0101 1010;
pid /usr/local/nginx/logs/nginx.pid;

events {
worker_connections 1024;
use epoll;
}

http {
include mime.types;
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 /usr/local/nginx/logs/access.log main;
error_log /usr/local/nginx/logs/error.log debug;
#google_perftools_profiles /var/spool/nginx/profile;

sendfile on;
tcp_nopush on;

gzip on;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_http_version 1.0;
gzip_comp_level 1;
gzip_proxied any;
gzip_types text/plain text/css text/javascript text/xml
application/x-javascript application/xml application/xml+rss;

  include /usr/local/nginx/conf/vhosts/*.conf;

}

example vhosts/mydomain.conf

server {
listen xxx.xxx.xxx.xxx:80;
server_name mydomain.com;
access_log /usr/local/nginx/logs/mydomain.com.access.log main;
error_log /usr/local/nginx/logs/mydomain.com.error.log notice;
#client_header_buffer_size 8k;
#client_body_buffer_size 256k;
keepalive_timeout 10 10;

error_page 404 = /error/404.html;
error_page 502 503 504 = /error/50x_error.html;

location /error/50x_error.html {
internal;
}

root /home/username/html;
autoindex on;
index index.php index.html;

location ~ .php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME
/home/username/html$fastcgi_script_name;
fastcgi_intercept_errors on;
break;
}

location ~* .(jpg|jpeg|gif|css|png|js|ico)$ {
root /home/username/html;
access_log off;
expires 30d;
break;
}

 ## Serve an empty 1x1 gif _OR_ an error 204 (No Content) for 

favicon.ico
location = /favicon.ico {
#empty_gif;
return 204;
}

}

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,14726,14726#msg-14726

Apologies for the quotes, forgot i was posting to mailing list for nginx
forums.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,14726,14740#msg-14740

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs