开发者

Can't run ruby on rails project under apache /var/www/

开发者 https://www.devze.com 2023-03-19 00:58 出处:网络
Can\'t run ruby on rails project under apache /var/www/ I installed on debian/ubuntu: iilibapache2-mod-fastcgi2.4.7~0910052141-1Apache 2 FastCGI module for long-running CGI scripts

Can't run ruby on rails project under apache /var/www/

I installed on debian/ubuntu:

ii  libapache2-mod-fastcgi                2.4.7~0910052141-1                         Apache 2 FastCGI module for long-running CGI scripts
ii  libapache2-mod-scgi                   1.13-1build1                               Apache module implementing the SCGI protocol
ii  libcgic-dev                           2.05-2                                     C library for developing CGI applications
ii  libcgic2                              2.05-2                                     C library for developing CGI applications
ii  libcupscgi1                           1.4.6-5ubuntu1                             Common UNIX Printing System(tm) - CGI library
ii  libfcgi-ruby1.8                       0.8.8-1                                    FastCGI library for Ruby
ii  libfcgi-ruby1.9.1                     0.8.8-1                                    FastCGI library for Ruby
ii  libfcgi0ldbl                          2.4.0-8ubuntu1                             Shared library of FastCGI
ii  libgcgi0                              0.9.5.dfsg-6                               library for CGI programs in C
ii  libapache2-mod-passenger              2.2.11debian-2                             Rails and Rack support for Apache2

Putting the demo/ on /var/www/ http://localhost/demo => I got the folders/files on browser I also edited the apache2.conf: "cat /etc/apache2/sites-available/default"

ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    #AllowOverride None
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    开发者_如何学运维Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

someone please help,


You have to point the DocumentRoot to the public folder of your Rails app. In your case that would be /var/www/demo/public. See the documentation for more information.

If this is going to be a production server, please seek help from a professional. Else you might leave your application (and your users' data) vulnerable.


In addition to @Wukerplank...

From what you posted, it doesn't seem like you've configured Phusion Passenger (a.k.a. mod_rails)

Here is a link to documentation for Passenger configuration.

0

精彩评论

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