Giter VIP home page Giter VIP logo

yyweb's Introduction

知言译义网 http://zyyywang.com

有问题可以联系我 [email protected] (MOsky)

-------------部署------------------

环境:Rails 3.0 + Passenger + Nginx + mysql 14.14

----------------部署------------------

$ gem install passenger

$ passenger-install-nginx-module

然后选择 1;然后选择 ruby

如果中途提示系统缺乏什么,按照提示安装就是,然后重新安装Nginx。(回到第一步)

选择 1 (Yes: download, compile and install Nginx for me...)

Please specify a prefix directory [/opt/nginx]:

设置安装路径为:/usr/local/nginx

等待安装完毕...

$ln -s /usr/local/nginx/sbin/nginx /usr/sbin/

$ vim /usr/local/nginx/conf/nginx.conf

server {
    listen 80;
    server_name zyyywang.com;
    
    root /home/taozeyu/projects/yyweb/public;
    
    location / {
        proxy_pass http:127.0.0.1:3000/;
    }
}----------------部署------------------

$ gem install passenger

$ passenger-install-nginx-module

然后选择 1;然后选择 ruby

如果中途提示系统缺乏什么,按照提示安装就是,然后重新安装Nginx。(回到第一步)

选择 1 (Yes: download, compile and install Nginx for me...)

Please specify a prefix directory [/opt/nginx]:

设置安装路径为:/usr/local/nginx

等待安装完毕...

$ vim /usr/local/nginx/conf/nginx.conf

server {
    listen 80;
    server_name zyyywang.com;
    
    root /home/taozeyu/projects/yyweb/public;
    
    if ($host != 'zyyywang.com' ) {
        rewrite ^/(.*)$ http://zyyywang.com/$1 permanent;
    }
    
    location / {
        proxy_pass http:127.0.0.1:8080/;
    }
}

安全起见,不许外网访问3000端口。

$ screen

在screen 中启动服务程序

$ cd /home/rails/yyweb

$ passenger start -e production -p 8080

$ nginx

--------------------操作-------------------

$ nginx 启动 Nginx

$ nginx -s stop 关闭 Nginx

$ nginx -s reload (修改/usr/local/nginx/conf/nginx 后需要重新载入配置)

yyweb's People

Contributors

moskize avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.