AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 60274
Accepted
Jakub Arnold
Jakub Arnold
Asked: 2009-08-30 00:33:57 +0800 CST2009-08-30 00:33:57 +0800 CST 2009-08-30 00:33:57 +0800 CST

Rails 应用程序仅在开发模式下运行,无需登录生产

  • 772

我创建了超级简单的 Rails 应用程序

rails test
cd test/
script/generate controller home index
rm public/index.html

# uncommented map.root :controller => "home" in config/routes.rb

当我在开发模式下运行应用程序时,它工作得很好,一切都被记录下来

<VirtualHost *:80>
    DocumentRoot /opt/rails/test/public

    ErrorLog /opt/rails/test/log/error.log
    CustomLog /opt/rails/testlog/access.log combined

    RailsEnv development
</VirtualHost>

但是当我更改为 RailsEnv 生产时,

RailsEnv production

我得到这个丑陋的错误页面

We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.

error.log 或 production.log 中绝对没有任何内容,但是,在 access.log 中,我可以看到正在记录的请求。

我正在运行 Ubuntu x64 Jaunty。

apache-2.2 ruby-on-rails
  • 1 1 个回答
  • 2165 Views

1 个回答

  • Voted
  1. Best Answer
    user18783
    2009-08-30T07:39:55+08:002009-08-30T07:39:55+08:00

    您应该从 github 安装 ssl_requirement 插件。在生产中运行时,您将收到一封包含错误消息/会话转储等的电子邮件。

    http://github.com/rails/ssl_requirement/tree/master

    此外,命令“rm public/index.php”应该是“rm public/index.html”。

    我会检查 /var/log/apache2 中的日志,以确保您没有遗漏任何内容。我知道日志应该在您的自定义目录中,但是...

    • 0

相关问题

  • 在您分发的应用程序中使用 Apache HTTPD 运行 SSL 的最佳方式是什么?

  • 阿帕奇的替代品

  • 如何强制我的网址始终以 www 开头?

  • 在 Linux Xen VPS 上优化 Apache 和 MySQL

  • mod_rewrite 不转发 GET 参数

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    从 IP 地址解析主机名

    • 8 个回答
  • Marko Smith

    如何按大小对 du -h 输出进行排序

    • 30 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    Windows 中执行反向 DNS 查找的命令行实用程序是什么?

    • 14 个回答
  • Marko Smith

    如何检查 Windows 机器上的端口是否被阻塞?

    • 4 个回答
  • Marko Smith

    我应该打开哪个端口以允许远程桌面?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    MikeN 在 Nginx 中,如何在维护子域的同时将所有 http 请求重写为 https? 2009-09-22 06:04:43 +0800 CST
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    0x89 bash中的双方括号和单方括号有什么区别? 2009-08-10 13:11:51 +0800 CST
  • Martin Hope
    kch 如何更改我的私钥密码? 2009-08-06 21:37:57 +0800 CST
  • Martin Hope
    Kyle Brandt IPv4 子网如何工作? 2009-08-05 06:05:31 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve