server {
listen 80;
server_name localhost;
root /Users/kaka/Documents/Test/Dom1/public; # <--- be sure to point to 'public'!
passenger_enabled on;
...
}
修改 root 到另外一个项目..
@metal 本来是这样的 root /Users/kaka/Documents/Test/Dom/public 我把他修改指定到另外一个项目 root /Users/kaka/Documents/Test/Dom1/public 是修改不是添加...
user root staff;
worker_processes 10;
error_log logs/error.log;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /Users/kaka/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.10;
passenger_ruby /Users/kaka/.rvm/wrappers/ruby-1.9.2-p290/ruby;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
root /Users/kaka/Documents/Test/Dom/public; # <--- be sure to point to 'public'!
passenger_enabled on;
index index index.html index.htm;
location ~ ^/assets/ {
expires 1y;
add_header Cache-Control public;
add_header ETag "";
break;
}
location / {
autoindex on;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
我也查这个问题...
想去广东...
可以从http://rubygems.org/ 下载 gem 包,然后指定安装啊!
TextMate sublime gedit
我也是球迷 !
可以啊!顶
⌃ space
还好没有点我的贴!
要学会一招!
nginx 现在排名第二了吧!
设置 memcached 启动 wget http://www.joonworld.com/files/com.danga.memcached.plist sudo mv com.danga.memcached.plist /Library/LaunchDaemons/ sudo launchctl load /Library/LaunchAgents/com.danga.memcached.plist
worker_processes 1;
events {
worker_connections 1024;
}
http {
passenger_root /Library/Ruby/Gems/1.8/gems/passenger-3.0.11;
passenger_ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server
{
listen 81;
server_name kaka.local;
location / {
root /Users/kaka/Documents/soft/neza/public; #html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
worker_processes 1;
events { worker_connections 1024; }
http { passenger_root /Library/Ruby/Gems/1.8/gems/passenger-3.0.11; passenger_ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby;
include mime.types; default_type application/octet-stream;
sendfile on; keepalive_timeout 65;
server { listen 81; server_name kaka.local;
location / { root /Users/kaka/Documents/soft/neza/public; #html; #index /products/index index index.html index.htm; }
error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } } #20 楼 @lgn21st
2012/01/04 16:31:57 [error] 6726#0: *23 "/Users/kaka/kaka/public#html/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: kaka.local, request: "GET / HTTP/1.1", host: "kaka.local"
2012/01/04 16:31:57 [error] 6726#0: *23 open() "/Users/kaka/kaka/public#html/favicon.ico" failed (2: No such file or directory), client: 127.0.0.1, server: kaka.local, request: "GET /favicon.ico HTTP/1.1", host: "kaka.local"
我已经改了这个 root 路径 ,为什么还会找以前 /Users/kaka/kaka/public#html/index.html
这个路径呢!我重启了 Nginx
location / {
root /Users/kaka/Documents/soft/neza/public; #html;
#index /products/index
index index.html index.htm;
}
#11 楼 @lgn21st 现在 sudo nginx -t 可以通过了,但是 sudo nginx 启动时出下面这种情况! nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use) nginx: [emerg] still could not bind()
强迫排版