Display Pages after everything is setup.

I’ve setup my virtual host . Thin from Sinatra is running. . What am I missing to display my Sinatra pages. I’m getting no errors so it should be something small I am missing. I can display the page but only the default is the virtual host page I made.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thank you this answered my question


Based on the virtual host page that you’re getting, I’m assuming that you followed this tutorial to set up Apache. If so, your virtual host config should look like this:

<VirtualHost *:80>
    DocumentRoot /var/www/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

You’ll want to configure Apache to reverse proxy all requests to to your Sinatra app which is listening on localhost on port 8080. To do that, replace the DocumentRoot directive with the following:

    ProxyPreserveHost On
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/

Finally, restart Apache so that the changes take effect:

sudo service apache2 restart

If that does not work, check the error log for any errors (the following command prints the last 40 lines of Apache’s error log):

sudo tail -40 /var/log/apache2/error.log