nginx + rails完整版配置文件
来源:互联网 发布:mac 命令行链接mysql 编辑:程序博客网 时间:2024/05/24 04:25
#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 { passenger_root /usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.22; passenger_ruby /usr/local/rvm/gems/ruby-2.2.1/wrappers/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; client_max_body_size 20m; server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root /alidata1/website/04-xhjdcd.com-production/spark-point-website; index index.html index.htm; } #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; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } #静态网站部署 server { server_name yuanlunchuan.vicp.net; listen 80; root /alidata1/website/01-xhjdcd.com-alpha/spark-point-website; passenger_enabled off; location / { index index.html; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { server_name www.xhjdcd.com; rewrite ^(.*) http://xhjdcd.com$1 permanent; } #rails项目部署 server { server_name yuanlunchuan.vicp.net; listen 80; root /var/rails_project/public; passenger_enabled on; passenger_app_env production; passenger_env_var DATABASE_USERNAME developer; passenger_env_var DATABASE_PASSWORD password; passenger_env_var DATABASE_NAME sammartini_alpha; passenger_env_var SECRET_KEY_BASE a05eb3260cf73d139423485c1701cb2c5a4b308732727789985a705e6698aa8af17ce802fe7eeaa241c85952bebebd1dcb3bf8b3974c97ecadf5d3451f6346bf; location / { } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #}}
0 0
- nginx + rails完整版配置文件
- log4j配置文件完整版
- spring配置文件完整版
- ruby on rails Nginx
- Rails+nginx服务器部署
- rails nginx + passenger
- Passenger + Nginx 部署Rails
- Passenger + Nginx 部署Rails
- nginx配置文件
- nginx配置文件
- Nginx配置文件
- nginx 配置文件
- nginx配置文件
- nginx配置文件
- nginx配置文件
- nginx 配置文件
- nginx配置文件
- Nginx 配置文件
- Leetcode 22 Generate Parentheses 搜索与DP的纠结
- C++虚函数和纯虚函数和抽象类
- 算法复杂度分析
- android开发之蓝牙配对连接的方法
- [代码篇].net实现拍照上传到本地和ftp服务器
- nginx + rails完整版配置文件
- Linux串口设置参数
- java synchronized详解
- 手机网页制作的认识(有关meta标签)
- Android SharedPreferences复杂存储
- P1102 陶陶摘苹果
- Tensorflow安装教程(Ubuntu14.04+cuda-7.5+cudnn-v4)
- android文件存储
- 使用webview几种常见的hybrid通信方式