开发者

Need help setting up passenger with apache

开发者 https://www.devze.com 2023-03-09 03:57 出处:网络
I\'m trying to setup passenger with apache on Fedora 14. The install went ok but I\'m unable to configure apache correctly.

I'm trying to setup passenger with apache on Fedora 14. The install went ok but I'm unable to configure apache correctly. I made these changes to the file. I cannot start apache unless I comment out the virtual host portion.

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7 PassengerRuby /usr/bin/ruby

 <VirtualHost *:80>    
     ServerName localhost    
 DocumentRoot  /home/antarr/pull/public      
     <Directory /home/antarr/pull/public>
            AllowOverride all      
            Opt开发者_StackOverflow中文版ions -MultiViews      
      </Directory>  
      </VirtualHost>


You also need the following two lines in your apache2.conf or in a conditionally loaded, module specific conf file:

PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7
PassengerRuby /usr/local/bin/ruby


Instead of modifying httpd-vhosts.conf override DocumentRoot in your httpd.conf

# Override default DocumentRoot with you root
DocumentRoot "/home/antarr/pull/public"
<Directory "/home/antarr/pull/public">
    Allow from all
    Options -MultiViews
    Require all granted
</Directory>

Before restarting server make sure your conf change is reflected

apachectl -S

The Document root should point to your root folder. And restart apache.

0

精彩评论

暂无评论...
验证码 换一张
取 消