Now you need to configure Apache so that all requests for your domain go to you Lighttpd configuration. Once complete, your Rails application will be available at http://yourdomain.tld/ instead of http://yourdomain.tld:XXXX/
Login to Webmin (https://webmin.server.textdrive.com/)
Note: You'll need to substitute server with the name of the actual server for your account.
- Under Servers, click Apache Webserver
- Click on Virtual Server for the domain you wish to configure (You’ll need to repeat these steps for each domain you want to proxy to Lighttpd.) If you don't see that option, it's OK. Just proceed to the next step (you probably have only one domain)
- On the Virtual Server Details page, click Aliases and Redirects
- Under Map local to remote URLs, enter a slash "/" in the empty field under Local URL path (it should be the last one in the row)
- In the same row, but under Remote URL, click the radio button to the left of the right-most field (you should now be able to type in it)
- In the right-most field under Remote URL, enter http://127.0.0.1:XXXX/ including the port number (XXXX) with a trailing slash
- Click Save
- Click Return to server list
- Under Virtual Server Details, click on Proxying
- Look for the setting Preserve original Host: header and set it to Yes
- Click Save at the bottom of the page
- Now in the upper right-hand corner, click Apply Changes. This will restart Apache and save your settings.
Once your settings have been saved, any requests to your domain ("/") will go to Lighttpd which is running under your assigned port number (http://yourdomain.tld:XXXX/)
And that's it! You've now got your Rails application up and running under Lighttpd.
