• Build Web Server with Apache and Passenger


    Follow the instructions at 2.6. Generic installation, upgrade and downgrade method: via tarball of Phusion Passenger users guide, Apache version

    Build web server on a precise64 Ubuntu virtual machine with vagrant. First download the tar file from this website, then create a vagrant file:

    $ pwd
    
    /home/chad/docs/passenger
    
    
    
    $ ls
    
    passenger-4.0.40.tar.gz  Vagrantfile
    
    
    
    $ cat Vagrantfile
    
    # -*- mode: ruby -*-
    
    # vi: set ft=ruby :
    
    
    
    $script = <<EOF
    
    echo 'Acquire::http::Proxy "http://10.21.3.31:8087";' > /etc/apt/apt.conf
    
    apt-get update
    
    apt-get install rake
    
    apt-get install libcurl4-openssl-dev
    
    apt-get install apache2-mpm-worker
    
    apt-get install apache2-threaded-dev
    
    /usr/bin/gem install rack
    
    apt-get install libapr1-dev
    
    apt-get install libaprutil1-dev
    
    mkdir /opt/passenger
    
    cd /opt/passenger
    
    tar zxvf /vagrant/passenger-4.0.40.tar.gz
    
    #cd passenger-4.0.40
    
    #./bin/passenger-install-apache2-module
    
    EOF
    
    
    
    VAGRANTFILE_API_VERSION = "2"
    
    
    
    Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    
      config.vm.box = "precise64"
    
    
    
      config.vm.define "svr" do |server|
    
        server.vm.hostname = "www.httpserver.com"
    
        server.vm.provider :virtualbox do |vbox|
    
          vbox.customize ["modifyvm", :id, "--natnet1", "10.3/16"]
    
          vbox.customize ["modifyvm", :id, "--memory", 1000]
    
        end
    
        server.vm.network "forwarded_port", guest: 80, host: 8765
    
        config.vm.provision "shell", inline: $script
    
      end
    
    end
    
  • 相关阅读:
    vue 之 vuex
    vue中this.$router.push() 传参
    ES6新特性
    css优先级
    创建第一个vue工程
    对Vue.js的认知
    前端的认知与见解
    Web前端常见问题
    数据库如何进行索引优化
    Python FAQ
  • 原文地址:https://www.cnblogs.com/darkmatter/p/3625709.html
Copyright © 2020-2023  润新知