Home >Operation and Maintenance >Apache >Does Apache support Ruby programs?

Does Apache support Ruby programs?

(*-*)浩
(*-*)浩Original
2019-11-26 13:57:232607browse

Does Apache support Ruby programs?

Running ruby ​​files on Apache requires mod_ruby to be enabled. Apache can also handle ruby ​​files via FastCGI. Multiple versions of ruby ​​can be used with the help of mod_fcgid i.e. FastCGI.

You can also install apache passenger and configure Apache to use it to serve ruby ​​pages. (Recommended Learning: Getting Started with Apache)

(Phusion Passenger also known as "Passenger" is a free web server module designed to integrate with Apache and Nginx)

The steps to install mod_ruby on the server are as follows

cd /tmp

wget http://www.modruby.net/archive/mod_ruby-1.2.6.tar.gz

tar zxvf mod_ruby-1.2.6.tar.gz

cd mod_ruby-1.2.6/                    

./configure.rb --with-apr-includes=/usr/include/apr-1

make

make install

How to run Ruby using Apache?

You need to add the mod_ruby module to the Apache configuration, i.e. /etc/httpd/conf.d/ruby.conf and add the following lines.

LoadModule ruby_module modules /mod_ruby.so

If you want to enable or disable these modules, you must edit the apache configuration file and comment or uncomment these modules (if the web server has been compiled with these modules).

Does Apache support Ruby programs?

The above is the detailed content of Does Apache support Ruby programs?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn