您可以在網站上安裝使用 Ruby 編程語言開發的自訂 Web 應用程式。
若要在您的網站上安裝使用 Ruby 編寫的應用程式:
/htdocs
目錄,並在應用程式檔案所處位置建立子目錄。使其呼叫此目錄 your_application
,僅作說明用。htdocs/your_application
目錄。.htaccess
的檔案,可選擇使用文字編輯器開啟此檔案,並將以下行新增到此檔案中:RewriteEngine On RewriteRule ^$ /public/index.html [L] RewriteCond %{REQUEST_URI} !^/your_application/public
RewriteRule ^(.*)$ /public/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ public/dispatch.fcgi/$1 [QSA,L]
your_application/public/.htaccess
your_application/public/dispatch.fcgi
,並將以下行放入該檔案中:#!/usr/bin/ruby
現在則可以從以下 URL 存取 web 應用程式:http://your-domain.com/your_application。