I have a ruby on rails application which runs on Middleman Server. I installed that application in windows azure ubuntu virtual machine. After completing installation once i started my server by giving this command "middleman server" my application is running well. After that i have installed apache web server for that application by following this procedure

http://nathanhoad.net/how-to-ruby-on-rails-ubuntu-apache-with-passenger

but im getting this error after completing the above procedure

"it works! this is the default web page for this server. the web server software is running but no content has been added, yet."

Please help me how to install a webserver for a ruby on rails application which normally runs on middleman server.

有帮助吗?

解决方案

You said you have Apache installed, there's your web server. And if you installed Passenger you have an application server for your Rails or Middleman. Check out the Phusion Passenger users guide, Apache version. I followed that to set up. Are you trying to view the src as you work or the build after you run middleman build? What are you building, a Rails or Middleman app/site?

I have been messing around with different approaches for Middleman Development setups. I ended trying a few different configurations and documented them in a Gist. Scroll down and there is some info on my Passenger version, I'm very new to MM and that was the first time I tried Passenger, so please take that into consideration. I think the trickiest part was that Passenger requires a public folder, but Middleman doesn't use a public folder at all. I think the Passenger with Middleman has a few more 'gotchas' over the other approaches. Check out the 3.0 in my Gist.

My vhosts file looks like this:

# Testing Middleman Development Approaches #3 with Passenger,
# note the public folder is used to serve the src directory
<VirtualHost *:80>
    ServerName mm_passenger.loc
    DocumentRoot /Users/davekaplan/mm_passenger/public
    ServerAlias mm_passenger.loc.*.xip.io
    <Directory /Users/davekaplan/mm_passenger/public>
        AllowOverride all
        Options -MultiViews
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName mm_passenger.build
    DocumentRoot /Users/davekaplan/mm_passenger/build
    <Directory /Users/davekaplan/mm_passenger/build>
        AllowOverride all
        Options -MultiViews
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

I'm on Mac running Apache and Passenger. I did a virtual host (path to site files) to the Apache /etc/apache/extra/httpd-vhosts.conf file and the domain to my /etc/hosts file.

Don't give up!

Dave

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top