Displaying 20 results from an estimated 6000 matches similar to: "how does request.host get set?"
2009 Jun 25
1
request.host, proxy chains and HTTP_X_FORWARDED_HOST
Hi,
We''ve an application that uses url_for in controllers and views. In
views, url_for generates a relative url (as if :only_path where used).
All is fine there.
However, in controllers, url_for generates a full url, with the host
name. This causes problems when we have a chain of Apache proxy
servers:
My Browser ---> Proxy 1 ----> Proxy 2 ----> Phusion Deployment Server.
In
2016 Jul 27
2
Proxy
Hi all,
I want to do a proxy to icecast (:8000) with nginx (:80).
Its working for me, stream is running on port 80, but on the first loading
is "pending" For a long time before its starts play.
Who using the "proxy_pass" on nginx and can help?
Thnx.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2010 Feb 14
6
Nginx Sock And Rails Envinroment Error
Hi There,
Im running an amazon instance with nginx proxying to a unicorn sock.
For some reason, even though i specify the production environment, when being visited by nginx, the site shows errors in development form.
Interestingly, when running on a port rather than a sock, if i visit that port, the errors are rendered as normal with a 500 page, the same port, throught nginx, shows errors
2006 Dec 29
9
Error : No protocol handler was valid for the URL...
Hi everybody,
I just suscribe to the list because I have a problem using mongrel and
mongrel_cluster... I setup a server (debian unstable wich provide apache
2.2.3 as a pakage) but I have an error when I try to access my application :
ERROR 403 : Forbidden, You don''t have permission to access / on this
server.
When I check apache''s logs I found that :
[warn] proxy: No
2012 Feb 10
2
My Host
I need to get some absolute redirects working -- basically I set callback
hooks to external services, but I want these hooks to use my configured
CNAME''s. I''m trying to find a way so that my app doesn''t have to know
about these CNAME''s. So I''m looking at the request in the controller to
try and get the base URL where I''m running.
To
2009 Jun 22
1
Action caching with multiple domains
I have recently setup some action caching in my Rails app and everything
seems to be working fine. I am using file store pointing at /tmp/cache. The
problem I am running into is that separate cache directories are being
created for different domain names that point at the same server. For
example mysite.com and www.mysite.com will have different cache directories.
It seems like it should be easy
2006 May 26
1
RewriteRule to strip www. ?
I''m trying to add a RewriteRule to my .htaccess to remove the www.
prefix from requests. The following works on its own:
RewriteCond %{HTTP_HOST} www.mysite.com
RewriteRule (.*) http://mysite.com/$1
But it blows up when I try to add it to my .htaccess file. I''ve tried
moving it around, before and after the various Rails-specific rules, but
I can''t get it to work.
2006 Jul 09
3
Mongrel and proxying with Apache 2 mod_proxy
Hi all,
I''ve just spent some time going through trying to get mongrel & apache
2.0 working with mod_proxy. I thought I''d share what I''ve found in
case someone is going through the same exercise.
Of late, I''ve been using mongrel (lovely, btw) to run my rails apps.
Since I have a couple of different rails apps running on the machine,
I thought it be nice to
2009 Feb 20
6
rails 2.2.2 does not work with ruby 1.9.1
Hi everyone! I''ve installed new Ruby 1.9.1 from sources
(http://www.ruby-lang.org/en/), then "gem install rails", everything was
ok during installation, all tests ("make test") were ok too.
After all, i wanted to create my new RoR project, but I could not start
it.
Plz help me
Here is my terminal:
[renat@localhost rails]$ rails mysite
create
create
2006 Jul 20
5
RJS where to put helper method?
Hi,
If I want to have helper method for my rjs, where''s the best place to put
it?
so for example:
--- bla.rjs:
page.replace_html ...
page.visual_effect ...
--- somewhere: (currently I put in application_helper.rb)
def replace_with_effect(page)
page.replace_html ...
page.visual_effect ...
end
--- bla.rjs:
replace_with_effect page
and is there a way to define the helper so we
2006 Jul 14
5
migration and inserting default data
Hi,
I''m wondering is there a way to load default data in the migration script?
So, for example I''m creating new table to store the order status, I also
want to pre-populate the table with some data from a sql file.
I have done a quick search on the list but cannot find anything.
thanks,
- reynard
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Aug 15
3
Testing deleting files
In unit or functional test, is there a way to check that a file has been
deleted?
It seems that running the test does not really execute deleting files, which
is good because I don''t want it to actually delete the files. But can I
check that the deletion should have been performed in test environment?
thanks,
- reynard
-------------- next part --------------
An HTML attachment was
2008 Jan 02
3
disabling backgroundrb_debug.log
is there an easy way to disable logging to backgroundrb_debug.log?
Regards
- reynard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080102/195dee18/attachment.html
2009 Feb 19
5
creating virtual hosts with Mongrel?
Does anyone know how to use Mongrel to create virtual hosts? My
production site will have all kinds of domains pointing to it, and I
also need to figure out how to do subdomains. Rails should react to
the host name, doing a lookup based on the name and pull different
records from the database based on this.
For example, I''d like www.mysite.com to point back to 127.0.0.1:3000,
and the
2007 Nov 07
2
workers cleanup
Hi,
I''m using backgroundrb 0.2.1 and having problem with worker processes
staying around when the rails application does not explicitly delete
them.
Is there a way to automatically delete the worker processes when it
has completed the job?
Also does killing the process manually (using kill command) harm the
backgroundrb server? I have some occasions where the backgroundrb
server just
2007 Dec 18
1
process queue
I noticed that backgroundrb does some kind of process queueing now? When I
pounded the server to create 1000 workers, there are always only around
30-40 processes running at a time, which is good :)
Is there some configuration for adjusting the max process?
- reynard
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2008 Jun 21
5
RJS can't modify frozen string
Any ideas why RJS would start causing "can''t modify frozen string"
errors? This was working last night and I''m not sure what could have
been changed to cause this. The app is on a VPS not shared hosting.
/!\ FAILSAFE /!\ Fri Jun 20 20:13:37 -0700 2008
Status: 500 Internal Server Error
can''t modify frozen string
2006 Jun 13
6
why some features uses new and some just static function call
Hi,
when using prototype and scriptaculous, isn''t it confusing sometimes to
remember which ones you have to use new and which ones that are just static
function call.
For example:
new Insertion.Before(...);
new Effect.Opacity(...)
Effect.Fade(..);
Effect.Appear(...);
I havent really looked at the implementation, but out of curiosity, I''m just
wondering is there a reason some
2007 Nov 09
2
Backgroundrb alternative idea
Hi,
I was just thinking if this simple idea would serve to replace backgroundrb:
What if the worker is replaced with just a ruby script (can be
anything actually: php, perl, etc)
Rails application can just spawn new process by calling this worker
script (passing data, and possibly uniq id)
The worker script then store the result in database keyed by the uniq
id (which is accessible by the Rails
2007 Jan 17
8
can i force a favicon.ico ?
lo there all,
i am running two websites on one server. Both use the same code and both
domains point to the same public folder. I use different logos by using
a session variable called session[:domain] that i find with
env_table[''HTTP_HOST'']
so anyway, both need a different icon to go in the bookmarks and url, i
know this is done with a favicon.ico, but can i force the server