1. Install apachesudoapt-getinstallapache2Ps: Open the browser, request http: // localhost, the following interface appears, prove that the installation is successful Itworks! This
1. install apache
Sudo apt-get install apache2
Ps: Open the browser and request http: // localhost. The following interface is displayed, proving that the installation is successful.
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
2. Install passenger
$ Sudo gem install passenger
$ Passenger-install-apache2-module
Ps: complete the installation as prompted. If the module "don't worry, this installer will tell you how to install them" is missing"
3. After installation, copy the final code to the apache configuration file/etc/apache2/httpd. conf.
Remember to delete the comment. Otherwise, an error will occur. After the comment is deleted, my configuration file is as follows:
LoadModule passenger_module/home/zernel/. rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot/home/zernel/. rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7
PassengerRuby/home/zernel/. rvm/wrappers/ruby-1.9.2-p180/ruby
ServerName www.linuxidc.com
DocumentRoot/somewhere/public
AllowOverride all
Options-MultiViews