-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathnginx.conf
98 lines (75 loc) · 2.38 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#user nobody;
worker_processes 1;
# [ debug | info | notice | warn | error | crit ]
error_log logs/error.log debug;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
# Ruby 1.9.3 !problems!
#passenger_root /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12;
#passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p194/ruby;
# Ruby 1.9.2
passenger_root /usr/local/rvm/gems/ruby-1.9.2-p320/gems/passenger-3.0.12;
passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.2-p320/ruby;
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 logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
upstream php {
server unix:/var/run/php-fpm.sock;
#server 127.0.0.1:9000;
}
# Rails test configuration
server {
listen 0.0.0.0:80;
server_name railsdomain.com;
root /home/ubuntu/railsdomain/public;
access_log logs/railsdomain_access.log;
error_log logs/railsdomain_error.log;
passenger_enabled on;
rails_env development;
}
# Php/Wordpress test configuration
server {
listen 0.0.0.0:80;
server_name phpdomain.com;
access_log logs/phpdomain_access.log;
error_log logs/phpdomain_error.log;
root /home/ubuntu/phpdomain;
index index.php;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
# This is cool because no php is touched for static content
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
include fastcgi.conf;
fastcgi_intercept_errors on;
fastcgi_pass php;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}
}