我刚刚完成迁移我的Redmine安装,并用webricktesting后,一切正常,该网站与http://localhost:3000很好地工作 接下来,我安装并configuration了mod_passenger,添加了一个单独的虚拟主机,基本上只复制了以前服务器的configuration。 由于应用程序的绝对path并没有改变,我认为它会马上工作,但这是不正确的,显然乘客没有访问正确的目录。 以下是该虚拟主机的错误日志中出现的内容: Permission denied: /srv/redmine/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable 这里是configuration文件: 虚拟主机 <VirtualHost *:80> ServerName redmine DocumentRoot /srv/redmine/public ErrorLog /var/log/apache2/redmine_error.log RailsEnv production PassengerRoot /srv/redmine/public <Directory /srv/redmine/public> Options Indexes FollowSymLinks AllowOverride all Order allow,deny allow from all RailsBaseURI / PassengerResolveSymlinksInDocumentRoot on </Directory> </VirtualHost> 乘客configuration文件 <IfModule mod_passenger.c> PassengerRoot /usr PassengerRuby […]
我只是初学者,并尝试了解如何configuration我的RubyOnRails应用程序的apach web服务器。 我有Linux,为乘客安装了apache2,passenger和apache2-module。 安装时,我得到了这样的文字 LoadModule passenger_module /home/rubys/.rvm/…/ext/apache2/mod_passenger.so PassengerRoot /home/rubys/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.8 PassengerRuby /home/rubys/.rvm/wrappers/ruby-1.9.2-p290/ruby 我需要添加到我的Apacheconfiguration文件,所以,我使用 $ apachectl -V | grep HTTPD_ROOT $ apachectl -V | grep SERVER_CONFIG_FILE 文件,我需要的是在这里 /etc/apache2/apache2.conf 我的导轨应用程序在这里 /home/alexkd/WebDev/rails/depot 另外我有像这样的文本在/etc/apache2/ports.conf文件 NameVirtualHost *:80 Listen80 我必须复制到我的apache2.conf ? 并在那里我要补充一点: <VirtualHost *:80> ServerName depot.yourhost.com DocumentRoot /home/alexkd/WebDev/rails/depot <Directory /home/alexkd/WebDev/rails/depot> AllowOverride all Options -MultiViews </Directory> </VirtualHost>
我似乎无法在谷歌上find这个。 我试图搭build一个使用EC2和Elastic IP的快速testing网站,但是我陷入了如何编辑Apache网站文件,以便我可以查看该网站。 它被部署在/ var / www / ServerTest目录中,我想用Elastic IP来访问它(让我们来说我想做56.34.123.12/index.html)。 我怎么能设置? 以下是我迄今为止在网上find的内容: <VirtualHost *:80> ServerName www.example.com DocumentRoot /webapps/mycook/ServerTest <Directory /webapps/mycook/ServerTest> Allow from all Options -MultiViews </Directory> </VirtualHost> 但是,我没有像“www.example.com”这样的域名来链接它。 谢谢!
我有一个Rails 4应用程序,返回大量的呈现为JSON(23Klogging/ 2.8MB文档)的数据。 在我的笔记本电脑上使用WEBrick服务器testing这个调用,请求在573ms完成。 Completed 200 OK in 573ms (Views: 0.1ms | ActiveRecord: 51.2ms) 如果我使用Phusion Passenger切换到Apache,则完全相同的请求需要3025ms才能完成。 Completed 200 OK in 3025ms (Views: 0.1ms | ActiveRecord: 53.9ms) 我不明白为什么乘客会这么慢。 有什么想法吗? 我的开发环境正在运行OS X 10.7.5。 我安装了Apache 2.2.24和Passenger 4.0.23。
这是一个nuub的问题(我现在更多地是一个给pipe理员任务的程序员)。 我有一个rails应用程序,在远程windows server 2008机器上工作得很好(它的轨道2.3.5,我运行ruby script/server ,它运行在端口3000 (即我可以访问本地主机:3000)就好了。 。 假设机器域被称为domain.com ..如果我去domain.com:3000没有任何反应。 我如何让这个应用程序访问www? 如果我只是去domain.com我看到一个IIS欢迎页面。
我有一个使用fastcgi的Rails应用程序内的Wordpress工作。 现在,我正在移动所有东西,以便在/生产中访问它。 我移动了wordpress文件并将nginx位置块从/ wptest更新为/ blog。 但是,我突然得到一个403错误。 我相信我的文件权限是正确的 – drwxrwxr-x所有文件夹和-rw-rw-r–文件。 欣赏任何build议。 这是我的nginxconfiguration: server { listen 80; server_name [private]; root [private]; index index.html index.htm index.php; try_files $uri/index.html $uri/index.php $uri; if (-f $request_filename) { break; } location / { rails_env production; passenger_enabled on; rails_spawn_method smart; } location /blog { index index.php; try_files $uri $uri/ $uri/index.php; location ~ \.php$ […]
我试图部署Rails应用程序没有openshift(rails-2.0 + postrgesql)。 我认为在git push上的自动部署没有执行rake任务db:setup和db:migrate,因为我看到了 PG::UndefinedTable: ERROR: relation "users" does not exist 在~/logs/ruby.log 我的问题是如何手动运行rake任务? 在我认为是什么? 我可以在openshift上运行Rails控制台吗?
我需要为我的Rails应用程序之一configurationnginx来通过SSL路由一些页面,但面临configuration问题。 我有一个SSL证书,通用名是example.com ,我的网站是从www.example.com路由到example.com 这是我的nginx.conf: upstream unicorn { server unix:/tmp/unicorn.sock fail_timeout=0; } server { listen 80; server_name www.example.com; return 301 $scheme://example.com$request_uri; } server { listen 443 ssl; server_name example.com; #return 301 $scheme://example.com$request_uri; ssl on; ssl_certificate /certificate path; ssl_certificate_key /key path; } server { listen 80 default_server; ssl_certificate /certificate path; ssl_certificate_key /key path; root /public directory; try_files […]
我把web servers和db servers放在不同的自动缩放组中。 自动缩放组中的那些机器将被dynamic添加或删除。 因此,我不知道什么是数据库服务器的IP地址 在AWS下实现这一点的常用方法是什么?
在ubuntu 14.04的nginx / passenger / rails的EC2上有这个日志nginx: 应用程序31063 stderr: *错误* :不能执行/ usr / local / lib / ruby:权限被拒绝(13) App 31065 stderr:/etc/profile.d/rbenv.sh:line 3:rbenv:command not found nginx conf是: worker_processes 1; error_log logs/error.log; events { worker_connections 1024; } http { passenger_root /usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.18; passenger_ruby /usr/local/lib/ruby; include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name teste.com; root […]