In order to run Ruby-generated applications under Linux Apache, configure the following GeneXus properties:
- Web Server Property: Select Apache HTTP Server
- Web Root Property: URL used to run the application, with the following format:
- Site directory seen from server: Physical path where the executables will be copied. It corresponds to the physical location of the Web Root property value.
The following image shows an example configuration:
Deployment in linux server
Currently, the deployment is manual so you have to follow the steps below:
- Set up the environment, by following the steps explained in Linux setup for running Ruby.
- Create a directory in the Linux server (the same as the one specified in the "Site Directory Seen from server" property), for example, /var/www/demo.
- Copy the entire content of the <KB_path>\Rubymodel\web directory to the Linux directory previously created.
Important: In order to transfer the files from Windows to Linux, take into account that the files should be transferred in bin mode, or by using SSH (WinSCP) which uses that mode by default.
- In this paper we assume that you are using Apache 2.x.
Copy the content of apache.xml file (generated by Ruby under <KB_path>\Rubymodel\web) into the httpd.conf Apache file (<Apache_Home>\conf directory )
Note that apache.xml file contents are built from the "Web Root" and "Site Directory Seen from server" property values.
Edit gxruby.cgi file and check that the Ruby interpreter is correctly referenced (otherwise, edit the file and change it to the correct location):
- Grant gxruby.cgi execution permissions: chmod +x gxruby.cgi
Linux setup for running Ruby