Unable to set up Rails app by Apache on Mac OS X 10.9.3

94 views
Skip to first unread message

Liz Huang

unread,
Jun 23, 2014, 11:20:55 AM6/23/14
to rubyonra...@googlegroups.com


Hi,

I just upgrade a few apps from Rails 2.3.18 to Rails 4.0.4 and make sure
the apps are running on WEBrick. I follow the steps I have done to set up
apps by Apache on Snow Leopard, first install passenger and add the following to /etc/apache2/httpd.conf

  LoadModule passenger_module /usr/local/opt/passenger/libexec/buildout/apache2/mod_passenger.so

  PassengerRoot /usr/local/opt/passenger/libexec/lib/phusion_passenger/locations.ini

  PassengerDefaultRuby /usr/bin/ruby

then try to add RailsBaseURI /most (most is my rail project) in the .conf  inside /etc/apache2/sites/,
but no .conf file there anymore for Mac Marvericks, rather I find the .conf in folder
/Library/Server/Web/Config/apache2/sites, so I add the "RailsBaseURI /most" in the
file

Then I add a symlink as following:

ln -s /Library/WebServer/most/public /Library/WebServer/Documents/most


sudo apachectl stop
sudo apachectl start

Page http://localhost/most is like following:

Index of /most

Apache/2.2.26 (Unix) Phusion_Passenger/4.0.41 mod_ssl/2.2.26 OpenSSL/0.9.8y DAV/2 mod_wsgi/3.3 Python/2.7.5 Server at localhost Port 80

and couldn't display http://localhost/most/rannumgenerator/index     (rannumgenerator is controller I generated in most project).

Wonder if something that I should do for Mac Mavericks or some setting for Apache that I am not aware?

Thanks!
Liz Huang



Sampath Weerasinghe

unread,
Jun 23, 2014, 3:32:08 PM6/23/14
to rubyonra...@googlegroups.com

i used to go through this kind of drama, then one day someone told about heroku.

-Sam


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4a5bc228-cde2-48fa-80a2-69be1a7405a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jim

unread,
Jun 24, 2014, 10:11:30 AM6/24/14
to rubyonra...@googlegroups.com

and couldn't display http://localhost/most/rannumgenerator/index     (rannumgenerator is controller I generated in most project).

Wonder if something that I should do for Mac Mavericks or some setting for Apache that I am not aware?

You may need to look in your error log (probably in /var/log/apache2/) for more details on what happened to Passenger.  Also, I've never tried accessing Rails projects under a subdirectory like that, you may need to see if you need to set up something specifically to handle that.

I set my system up quite a bit differently to easier support working on different projects.  First, since Mac OS updates can overwrite http.conf, I put my custom config in the /etc/apache2/other/ directory, broken up into separate files.  So, I have a passenger.conf file and a vhosts.conf file.  I create entries in /etc/hosts to set up local domain names for my various projects.  So I end up with something like this:

/etc/hosts:
127.0.0.1       my.greatproject.local

/etc/apache2/other/passenger.conf:

LoadModule passenger_module /Users/jcrate/.rvm/gems/ruby-2.1.2@global/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
  PassengerRoot /Users/jcrate/.rvm/gems/ruby-2.1.2@global/gems/passenger-4.0.45
  PassengerDefaultRuby /Users/jcrate/.rvm/gems/ruby-2.1.2@global/wrappers/ruby
</IfModule>


/etc/apache2/other/vhosts.conf:

<VirtualHost *:80>
    ServerName my.greatproject.local
    DocumentRoot /path/to/project/public

    RackEnv development

    PassengerRuby /Users/jcrate/.rvm/gems/ruby-2.1.2@myproject/wrappers/ruby
</VirtualHost>


If you're not using RVM, then your passenger-related paths will look a little different.  However, if you have more than one Rails project, you probably want to be using RVM or some sort of ruby version manager.


Liz Huang

unread,
Jun 24, 2014, 11:15:41 AM6/24/14
to rubyonra...@googlegroups.com


Thanks! I will check heroku.

Liz

Liz Huang

unread,
Jun 24, 2014, 11:18:57 AM6/24/14
to rubyonra...@googlegroups.com


Thanks! I will try and see if I can figure it out, I use rbenv to manage ruby versions.

Best,
Liz

Liz Huang

unread,
Jun 24, 2014, 11:34:52 AM6/24/14
to rubyonra...@googlegroups.com

I checked error log in apache2 folder, it is empty. I wonder if it is related to permission for folders or files as I
am not using root, but admin account to develop rails projects.


Liz

On Tuesday, June 24, 2014 10:11:30 AM UTC-4, Jim wrote:

Hassan Schroeder

unread,
Jun 24, 2014, 11:42:17 AM6/24/14
to rubyonrails-talk
On Mon, Jun 23, 2014 at 8:20 AM, Liz Huang <liyhu...@gmail.com> wrote:

> I just upgrade a few apps from Rails 2.3.18 to Rails 4.0.4 and make sure
> the apps are running on WEBrick. I follow the steps I have done to set up
> apps by Apache on Snow Leopard, first install passenger and add the
> following to /etc/apache2/httpd.conf

Why?

If your goal is to sanity-check the app on httpd/Passenger because
that's your production setup, you'd be far better off replicating that
prod environment in a VM and testing there.

FWIW,
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

Liz Huang

unread,
Jun 27, 2014, 3:45:53 PM6/27/14
to rubyonra...@googlegroups.com

Hi, Jim:

I followed your advice, still couldn't get my site running. Do you set up your rails project in
Mac OSX Mavericks? It seems from its instruction, /etc/apache2/httpd.conf is
/Library/Server/Web/Config/apache2/httpd_server_app.conf
Wonder anyone here has luck setting up rails app in Mac OSX Mavericks.

Thanks!

Liz

On Tuesday, June 24, 2014 10:11:30 AM UTC-4, Jim wrote:

Scott Ribe

unread,
Jun 27, 2014, 4:04:02 PM6/27/14
to rubyonra...@googlegroups.com, Liz Huang
On Jun 27, 2014, at 1:45 PM, Liz Huang <liyhu...@gmail.com> wrote:

> Wonder anyone here has luck setting up rails app in Mac OSX Mavericks.

Yes, but I don't use the built-in apache and its configs. Honestly, if you want readily available help, probably best to turn off the "personal web sharing" and install & configure your own web server, in the "standard" unix-y location. I expect that would be easier than starting with Apple's built-in Apache config, which is configured for VERY basic personal use and then try to figure out to tweak their config. Also, if you install your own, it's less likely that OS updates will fubar your config and force you to go exploring again trying to figure out what to fix.

I personally just the built-in (to rails that is) service for development, then use nginx + unicorn for deployment.


--
Scott Ribe
scott...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




Jim

unread,
Jun 28, 2014, 8:41:11 AM6/28/14
to rubyonra...@googlegroups.com

I followed your advice, still couldn't get my site running. Do you set up your rails project in
Mac OSX Mavericks? It seems from its instruction, /etc/apache2/httpd.conf is
/Library/Server/Web/Config/apache2/httpd_server_app.conf 

Are you using Server.app?  If so, then things are somewhat different.  In fact, looking back at your original message I see you mentioned a Server-specific path.  

You would want to put your passenger.conf file in /Library/Server/Web/Config/apache2/other/.  

You can still edit your /etc/hosts file to include a local domain for your project, which will make things easier.  You would then set up a new website in Server.app, using the domain you set up /etc/hosts for your project, and tell it site files are stored in the public folder of your rails project.  I use RVM, so I have to edit the config file Server.app generates to add

PassengerRuby /usr/local/rvm/gems/ruby-2.1.2@my_gemset/wrappers/ruby

You can run this command from your rails project directory to see what you should be using for PassengerRuby:

passenger-config --ruby-command

If you want to run your rails app in development mode, you'll also need to add 

    RackEnv development

to your site config file.  Your site config file will be in:

/Library/Server/Web/Config/apache2/sites/

and will be named something like:

0000_any_80_my.project.domain.conf

Your passenger installation doesn't necessarily need to be done via rbenv, it will be just fine installed with the system ruby.  However, you will need the PassengerRuby directive so it knows where to find the ruby and gem set to use when it instantiates your project.

Jim

Jim

unread,
Jun 28, 2014, 9:20:40 AM6/28/14
to rubyonra...@googlegroups.com, liyhu...@gmail.com
On Friday, June 27, 2014 4:04:02 PM UTC-4, Scott Ribe wrote:
Yes, but I don't use the built-in apache and its configs. Honestly, if you want readily available help, probably best to turn off the "personal web sharing" and install & configure your own web server, in the "standard" unix-y location. I expect that would be easier than starting with Apple's built-in Apache config, which is configured for VERY basic personal use and then try to figure out to tweak their config. Also, if you install your own, it's less likely that OS updates will fubar your config and force you to go exploring again trying to figure out what to fix. 

Actually, the default Mac OS X installation of apache is pretty standard (in a BSD sense).  The config files live in /etc/apache2/, and *.conf files in /etc/apache2/other/ are loaded by default.  My config files haven't been touched even when upgrading from 10.8 to 10.9.  It's a little more tricky if you need PHP too, but it's still not difficult to add modules to the built-in php.   

In fact, the reason I started using the built-in apache was because I got tired of MacPorts blowing away all my config files seemingly at random.

Jim

Scott Ribe

unread,
Jun 28, 2014, 9:54:15 AM6/28/14
to rubyonra...@googlegroups.com
On Jun 28, 2014, at 7:20 AM, Jim <jim...@gmail.com> wrote:

> In fact, the reason I started using the built-in apache was because I got tired of MacPorts blowing away all my config files seemingly at random.

Ugh, shudder, no, I *NEVER* use MacPorts. If configure/make/install won't get the job done, I seriously reconsider whether I need it. (I've only give up once, forget what it was, but the rat's nest of dependencies was too much to sort. But PostgreSQL, nginx, pgbouncer, libevent, ghostscript, are all pretty easy...)

Jim

unread,
Jun 28, 2014, 3:31:08 PM6/28/14
to rubyonra...@googlegroups.com
On Saturday, June 28, 2014 9:54:15 AM UTC-4, Scott Ribe wrote:
On Jun 28, 2014, at 7:20 AM, Jim <jim...@gmail.com> wrote:

> In fact, the reason I started using the built-in apache was because I got tired of MacPorts blowing away all my config files seemingly at random.

Ugh, shudder, no, I *NEVER* use MacPorts. 

I got rid of MacPorts in the early days of Homebrew. I also used to just configure/make/install, but ImageMagick was a real hassle, and keeping track of my config scripts which listed all the options I wanted was annoying as well.  I'm pretty happy with Homebrew.

Jim

Liz Huang

unread,
Jun 30, 2014, 4:07:41 PM6/30/14
to rubyonra...@googlegroups.com

Dear Jm:

Thanks a lot for your reply!

Yes, server.app comes with Mavericks, so I use it to host Rails web apps and have tried to create
passenger.conf under other folder etc. I set up everything in snow leopard under directory "/etc/apache2",
and sites folder was also inside /etc/apache2, it is quite straightfoward and easy, but when I try
to do the samething with server.app under folder /Library/Server/Web/Config/apache2. I couldn't
make it work, the steps seem to be quite simple, but not easy to find out what might go wrong.

I used brew to install passenger.

Liz

Liz Huang

unread,
Jun 30, 2014, 4:15:32 PM6/30/14
to rubyonra...@googlegroups.com


Server admin in snow leopard is now server.app in Mavericks?

Liying


On Saturday, June 28, 2014 8:41:11 AM UTC-4, Jim wrote:

Jim

unread,
Jul 1, 2014, 9:46:56 AM7/1/14
to rubyonra...@googlegroups.com
On Monday, June 30, 2014 4:07:41 PM UTC-4, Liz Huang wrote:
 
Yes, server.app comes with Mavericks, so I use it to host Rails web apps and have tried to create
passenger.conf under other folder etc. I set up everything in snow leopard under directory "/etc/apache2",
and sites folder was also inside /etc/apache2, it is quite straightfoward and easy, but when I try
to do the samething with server.app under folder /Library/Server/Web/Config/apache2. I couldn't
make it work, the steps seem to be quite simple, but not easy to find out what might go wrong.

I used brew to install passenger.

The config file used for the web server in Mavericks Server is httpd_server_app.conf.  You may want to look in that file and make sure the line below exists and is not commented out.  It should be near the end of the file. 

Include /Library/Server/Web/Config/apache2/other/*.conf

I have never installed passenger with brew, only using ruby-gems either in the system ruby, or nowadays in RVM environments.  So, I'm not sure of any differences there may be installing it with brew, but I don't think there is any reason why it shouldn't work.

It can be tricky to find out exactly what is going wrong.   If you are still just getting the public directory listing when you load the site in your browser, then Passenger most likely has not been activated, which means there is some issue with your apache config.  If Passenger is loading and you don't have the PassengerRuby environment set up in your site config file properly, then you should get an error that Passenger can't start the web app.

If Passenger isn't loading at all, then check /var/log/apache2/error_log when you start your web server, and see what it says.  It should have some info about the startup process, and if Passenger is loading it should be mentioned.  If passenger is not mentioned, you can see if your passenger.conf file is getting loaded by changing the "LoadModule passenger_module" directive to have an incorrect path.  When I do that, apache silently fails to start (i.e. nothing in the access or error logs).  

Jim Crate

Liz Huang

unread,
Jul 1, 2014, 10:25:02 AM7/1/14
to rubyonra...@googlegroups.com


Thanks so much! I will carefully follow all your advice to see if I can get it work...

Best,
Liz

Liz Huang

unread,
Jul 1, 2014, 10:40:51 AM7/1/14
to rubyonra...@googlegroups.com


Great, it seems that I got further, now I got error message

It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:

bundle install
....

I did "bundle install" after I create the rails project, I did "gem uninstall passenger"
afterwards as the developer of passenger told me that I installed passenger by homebrew, I don't
need gem install passenger, o.w. I would have trouble...

Liz


On Tuesday, July 1, 2014 9:46:56 AM UTC-4, Jim wrote:

Liz Huang

unread,
Jul 1, 2014, 11:31:45 AM7/1/14
to rubyonra...@googlegroups.com

The problem was caused that line

PassengerRuby pathForRuby

got wiped out in file httpd_server_app.conf after I recreate the websites.

Now I got this error message, didn't find the fix...

integer 4294967294 too big to convert to `int' (RangeError)
  /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:724:in `chown'
  /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:724:in `block in remove_entry_secure'
  /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:718:in `open'
  /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:718:in `remove_entry_secure'
  /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger/utils/tmpio.rb:72:in `ensure in mktmpdir'
  /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger/utils/tmpio.rb:72:in `mktmpdir'
  /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger/native_support.rb:147:in `download_binary_and_load'
  /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger/native_support.rb:49:in `start'
  /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger/native_support.rb:405:in `<top (required)>'
  /usr/local/var/rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  /usr/local/var/rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger.rb:237:in `require_passenger_lib'
  /usr/local/Cellar/passenger/4.0.45/libexec/helper-scripts/rack-preloader.rb:75:in `init_passenger'
  /usr/local/Cellar/passenger/4.0.45/libexec/helper-scripts/rack-preloader.rb:157:in `<module:App>'
  /usr/local/Cellar/passenger/4.0.45/libexec/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
  /usr/local/Cellar/passenger/4.0.45/libexec/helper-scripts/rack-preloader.rb:28:in `<main>'
Application root
/Library/WebServer/most
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV)
development
Ruby interpreter command
/usr/local/var/rbenv/versions/2.1.0/bin/ruby
User and groups
uid=4294967294(nobody) gid=4294967294(nobody) groups=4294967294(nobody),12(everyone),61(localaccounts),
404(com.apple.sharepoint.group.4),403(com.apple.sharepoint.group.3),100(_lpoperator),401(com.apple.sharepoint.group.1),
402(com.apple.sharepoint.group.2)




On Tuesday, July 1, 2014 9:46:56 AM UTC-4, Jim wrote:

Jim

unread,
Jul 1, 2014, 11:33:54 AM7/1/14
to rubyonra...@googlegroups.com
On Tuesday, July 1, 2014 10:40:51 AM UTC-4, Liz Huang wrote:

Great, it seems that I got further, now I got error message

It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:

bundle install
....

You just need to get your PassengerRuby directive set up properly then.  That will need to be specified in your site configuration file in /Library/Server/Web/Config/apache2/sites/.   You can use the passenger utility:

passenger-config --ruby-command

which will show you what your PassengerRuby directive should look like.  I put that directive just above the closing </VirtualHost> tag in the site config file.  If you want to run in development mode, you will also need the "RackEnv development" directive.  

If you installed passenger using HomeBrew, then you do not want to list passenger as a requirement in your rails app Gemfile.  Personally, I only list app-specific gems in the Gemfile, and leave out the server-specific details like Passenger.

Jim

Liz Huang

unread,
Jul 1, 2014, 11:55:43 AM7/1/14
to rubyonra...@googlegroups.com


Yes, I did add that line in the .conf file inside sites folder and also add
RackEnv development

above PassengerRuby directive as below:

<VirtualHost ipaddress:80>
    ServerName ...
    ServerAdmin ad...@example.com
    DocumentRoot "/Library/WebServer/most/public"
    DirectoryIndex index.html index.php /wiki/ /xcode/ default.html
    CustomLog /var/log/apache2/access_log combinedvhost
    ErrorLog /var/log/apache2/error_log
    <IfModule mod_ssl.c>
        SSLEngine Off
        SSLCipherSuite "ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM"
        SSLProtocol -ALL +SSLv3 +TLSv1
        SSLProxyEngine On
        SSLProxyProtocol -ALL +SSLv3 +TLSv1
    </IfModule>
    <Directory "/Library/WebServer/most/public">
        Options All -Indexes -ExecCGI -Includes +MultiViews
        AllowOverride None
        <IfModule mod_dav.c>
            DAV Off
        </IfModule>
        <IfDefine !WEBSERVICE_ON>
            Deny from all
            ErrorDocument 403 /customerror/websitesoff403.html
        </IfDefine>
    </Directory>
    RackEnv development
    PassengerRuby /usr/local/var/rbenv/versions/2.1.0/bin/ruby
</VirtualHost>

the error I got now seem to be something different...

integer 4294967294 too big to convert to `int' (RangeError)
  /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:724:in `chown'
  /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:724:in `block in remove_entry_secure'
  /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:718:in `open'
  /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:718:in `remove_entry_secure'
  /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger/utils/tmpio.rb:72:in `ensure in mktmpdir'
  /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger/utils/tmpio.rb:72:in `mktmpdir'
  /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger/native_support.rb:147:in 
....
User and groups
uid=4294967294(nobody) gid=4294967294(nobody) groups=4294967294(nobody),12(everyone),61(localaccounts),
404(com.apple.sharepoint.group.4),403(com.apple.sharepoint.group.3),100(_lpoperator),
401(com.apple.sharepoint.group.1),402(com.apple.sharepoint.group.2)
Environment variables

Liz Huang

unread,
Jul 1, 2014, 3:56:37 PM7/1/14
to rubyonra...@googlegroups.com

4294967294 is actually "-2", default uid and gid for nobody in Mac OS X.
Not sure how to get around this, change ownership of some files will help?

Liz

Jim

unread,
Jul 2, 2014, 8:16:25 AM7/2/14
to rubyonra...@googlegroups.com
On Tuesday, July 1, 2014 11:55:43 AM UTC-4, Liz Huang wrote:
the error I got now seem to be something different...

integer 4294967294 too big to convert to `int' (RangeError)
  /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/
fileutils.rb:724:in `chown'
...

Who is the owner of your rails app?  Passenger will run your app as the user set as the owner of the rails root (or maybe the environment file, not sure).  For development, I just set myself as the owner.  For deployment, you may want to set up an unprivileged user to own the rails app, but apparently Passenger has issues if the "nobody" user owns the app.

Jim
 

Liz Huang

unread,
Jul 2, 2014, 9:03:16 AM7/2/14
to rubyonra...@googlegroups.com


Yes, "nobody" is the owner and it seems to be a bug with Ruby. I will change the ownship of the rails project
to see if it fixes the problem.

Liz

Liz Huang

unread,
Jul 2, 2014, 2:06:14 PM7/2/14
to rubyonra...@googlegroups.com

Yes! passenger will start up according to the ownership of config.ru file (>rails 3, or environment.rb for rails 1 & 2)
and has issue if it is owned by "nobody". I change ownership of config.ru file and it works now. Thanks a lot
for your help! Now I can host single rails app, will need to figure out how to set up multiple rails apps by sub URI.

Best,

Liz

On Wednesday, July 2, 2014 8:16:25 AM UTC-4, Jim wrote:

Walter Lee Davis

unread,
Jul 3, 2014, 7:41:12 AM7/3/14
to rubyonra...@googlegroups.com

On Jul 2, 2014, at 2:06 PM, Liz Huang wrote:

> will need to figure out how to set up multiple rails apps by sub URI.

If you've ever configured Apache for multiple name-based virtual hosts, you will have already done this. I host many Rails apps (non-critical) on my staging server, and Passenger makes it trivial to add another one. Just add the virtual host config file, make sure that the Directory statement therein points to the new app's public folder, and you're done.

As long as these sites aren't popular, there's really no limit to the number of them you can run, because Passenger will allow them to spin down if they don't get any requests, and you will get your memory back to use elsewhere. Of course if they all get crawled by Google at once, your server WILL fall over.

Walter

Алексей Ермолаев

unread,
Aug 5, 2014, 4:23:08 AM8/5/14
to rubyonra...@googlegroups.com
Hey, try out our new service http://teatro.io, which allow you to run stage server automatically in the cloud.

понедельник, 23 июня 2014 г., 19:20:55 UTC+4 пользователь Liz Huang написал:


Hi,

I just upgrade a few apps from Rails 2.3.18 to Rails 4.0.4 and make sure
the apps are running on WEBrick. I follow the steps I have done to set up
apps by Apache on Snow Leopard, first install passenger and add the following to /etc/apache2/httpd.conf

  LoadModule passenger_module /usr/local/opt/passenger/libexec/buildout/apache2/mod_passenger.so

  PassengerRoot /usr/local/opt/passenger/libexec/lib/phusion_passenger/locations.ini

  PassengerDefaultRuby /usr/bin/ruby

then try to add RailsBaseURI /most (most is my rail project) in the .conf  inside /etc/apache2/sites/,
but no .conf file there anymore for Mac Marvericks, rather I find the .conf in folder
/Library/Server/Web/Config/apache2/sites, so I add the "RailsBaseURI /most" in the
file

Then I add a symlink as following:

ln -s /Library/WebServer/most/public /Library/WebServer/Documents/most


sudo apachectl stop
sudo apachectl start

Page http://localhost/most is like following:

Index of /most

Apache/2.2.26 (Unix) Phusion_Passenger/4.0.41 mod_ssl/2.2.26 OpenSSL/0.9.8y DAV/2 mod_wsgi/3.3 Python/2.7.5 Server at localhost Port 80

and couldn't display http://localhost/most/rannumgenerator/index     (rannumgenerator is controller I generated in most project).

Wonder if something that I should do for Mac Mavericks or some setting for Apache that I am not aware?

Thanks!
Liz Huang



Reply all
Reply to author
Forward
0 new messages