Fedora-28-配置运行Ruby-脚本

#配置 LAMP https://ipsec.in/index.php/2018/05/04/fedora-28-lamp/
#配置 ruby https://ipsec.in/index.php/2017/11/21/fedora-27-install-rails-配置安装rails/

vim /etc/httpd/conf.d/m.conf

<VirtualHost *:80>
ServerName 127.0.0.1
ServerAdmin web@master
DocumentRoot "/var/www/html"

<Directory "/var/www/html">
    AllowOverride None
    Require all granted
    Options -Indexes +FollowSymLinks +ExecCGI
    AddHandler cgi-script .rb
</Directory>
</VirtualHost>


chown -R apache:apache /var/www/html

#错误日志
tail -f /var/log/httpd/*

vim /var/www/html/index.rb
#!/usr/bin/ruby
print "Content-type: text/html\n\n"
print "Hello Ruby"