There are two methods to do what you are looking for.
First
If it’s just a simply script, you can run the file easily by placing it inside of the cgi-bin folder. Make sure that you have “#!/usr/bin/ruby” (without the quotes) is at the top of the file to make sure that it is run by ruby correctly.
It is also important that you have ‘puts “content-type: text/html”’ (without the single quotes) at the top of the file. Otherwise it will attempt to download the output of the script rather than displaying it in your browser.
In regards to the second method, an article is in the works about how to do this outside of the cgi-bin folder using htaccess. It should be on our KnowledgeBase in the next day or two and I will reply here with a link once it is online.
If you have any questions, please feel free to either leave a comment here, or if you prefer, you can contact our support team directly by opening a ticket through Backstage.
If you have any questions, please feel free to leave a comment here, or if you would prefer, you can open a ticket with our support team through Backstage.
Answer #1
Hello,
I hope this reply finds you well!
There are two methods to do what you are looking for.
First
If it’s just a simply script, you can run the file easily by placing it inside of the cgi-bin folder. Make sure that you have “#!/usr/bin/ruby” (without the quotes) is at the top of the file to make sure that it is run by ruby correctly.
It is also important that you have ‘puts “content-type: text/html”’ (without the single quotes) at the top of the file. Otherwise it will attempt to download the output of the script rather than displaying it in your browser.
In regards to the second method, an article is in the works about how to do this outside of the cgi-bin folder using htaccess. It should be on our KnowledgeBase in the next day or two and I will reply here with a link once it is online.
If you have any questions, please feel free to either leave a comment here, or if you prefer, you can contact our support team directly by opening a ticket through Backstage.
Happy Hosting!