Passenger有一个专门安装nginx的模块,安装起来非常方便
安装的时候一个问题提示缺少
引用
* Checking for Curl development headers with SSL support...
Found: no
Error: Cannot find the `curl-config` command.
Found: no
Error: Cannot find the `curl-config` command.
解决办法
- sudo apt-get install libcurl3-dev
配置用户权限
引用
创建用户adduser www
nginx配置文件里设置user www
设置web 网站的文件夹(mysite)权限
chown www -R mysite
如果你之前用chmod 777修改过mysite,需要
chmod -R 755 mysite
find mysite -type f -exec chmod 644 {} \;
确保文件夹是755, 文件是644权限。
nginx部分配置文件
- user www;
- worker_processes 1;
- ......
- http {
- passenger_root /usr/local/rvm/gems/ruby-2.0.0-p195/gems/passenger-4.0.5;
- passenger_ruby /usr/local/rvm/wrappers/ruby-2.0.0-p195/ruby;
- include mime.types;
- default_type application/octet-stream;
- #access_log logs/access.log main;
- sendfile on;
- #tcp_nopush on;
- #keepalive_timeout 0;
- keepalive_timeout 65;
- #gzip on;
- server {
- listen 8080;
- server_name localhost;
- #charset koi8-r;
- #access_log logs/host.access.log main;
- location / {
- root /home/redmine-2.3/public;
- index index.html index.htm;
- passenger_enabled on;
- }
- #error_page 404 /404.html;
- # redirect server error pages to the static page /50x.html
- #
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- }
- }
没有评论:
发表评论