search for: http_host

Displaying 20 results from an estimated 82 matches for "http_host".

2009 Jun 17
2
Using a cgi perl program?
...Document 500 /500.html ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" In the /public_html folder I have this .htaccess file: Options +FollowSymlinks RewriteEngine on ### redirect subdomains to user profile page ### RewriteCond %{HTTP_HOST} !^www\.timefreedomnow\.net [NC] RewriteCond %{HTTP_HOST} !^support\.timefreedomnow\.net [NC] RewriteCond %{HTTP_HOST} ([^.]+)\.timefreedomnow\.net [NC] RewriteRule ^(.*)$ http://www.timefreedomnow.net/profile/%1 [L,R] ### redirect subdomains to user profile page ### RewriteCond %{HTTP_HOST} !^www...
2005 Jun 22
0
HTTP_HOST in rails
Hi All, Rails 0.12.1 doesn''t seem to be able to handle requests that don''t provide the HTTP_HOST variable in my environment (apache2/fcgi). This isn''t really a huge deal in practice, but it points to an actual oversight in the code, or perhaps in my config. Thoughts? ActionView::TemplateError (undefined method `+'' for nil:NilClass) on line #1 of /home/index.rhtml: 1: <% c...
2017 Nov 13
2
Strrange behavior of VirtualHosts in Apache (CentOS6)
....3.4:80> ServerAlias *.example.com DocumentRoot /var/www/catchall </VirtualHost> the DocumentRoot directories are empty, only in /var/www/default I have a PHP script: host.php <?php header( "Content-type: text/plain" ); printf( "Host: '%s'\n", $_SERVER['HTTP_HOST'] ); ?> now the strange behavior; http://mail.example.org/ <-- works http://smtp.example.org/ <-- doen't work http://smtp.example.org/host.php <-- gives the HTTP_HOST (PHP-script), but why? http://www.example.com/ <-- works http://hell...
2007 Oct 16
1
redirects with mongrel (dropping the www. from a url)
...ant to set up a redirect from www.someapp.com to someapp.com (dropping the www.) I have tried doing this in apache using a rewrite rule (below) which worked before when the app was written in php. Redirect http://www.soccertackle.com/ http://soccertackle.com RewriteEngine on RewriteCond %{HTTP_HOST} !^soccertackle\.com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*) http://soccertackle.com/$1 [L,R] Now the app has been completely re written in rails using mongrel & apache (i don''t really understand much about web servers but mongrel set up was nice and s...
2009 Jul 23
2
apache redirect rule
...nside virtual host which redirects all / to /polarion using this RedirectMatch permanent ^/$ /polarion/ 2) what I want to achieve is to check if user comes from extensions.polarion.com and If so to redirect him to extensions.polarion.com/polarion/extensions I guess something like : RewriteCond %{HTTP_HOST} extensions.polarion.com RewriteRule / http://extensions.polarion.com/polarion/extensions/ Is this going to work? Thanks milion times. David
2006 Feb 20
2
DNS Setting
Hello People, In my DNS setting I added A record of www for our company website. It works, when you go to http://www.mycompany.com; it resolves and it shows the website content. But in addition, I want also some kind of redirection or mapping (i don't know what you called that) that when people go to http://mycompany.com (without www), it should forward also to the www server. How to do
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:
2007 Nov 14
2
Exception Notification plugin options hash handling????? backwards merge?
...ller.action_name} (#{exception.class}) #{exception.message.inspect}" recipients exception_recipients from sender_address body data.merge({ :controller => controller, :request => request, :exception => exception, :host => request.env["HTTP_HOST"], :backtrace => sanitize_backtrace(exception.backtrace), :rails_root => rails_root, :data => data, :sections => sections }) end It appears to me that he receiver and parameter of that merge message in the argument to the bod...
2010 Jan 21
4
Redirect www to non-www
How to redirect www to non-www? e.g redirect www.example.com to example.com Thanks Johnny -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2012 Feb 10
2
My Host
...where I''m running. To test, I''m using localtunnel. I have found what I''m looking for in 3 places, and I''m wondering if one is better than another or if one is more reliably set than another. request.env["SERVER_NAME"] request.host request.env["HTTP_HOST"] All three of these have the value I''m looking for (e.g. "3eym.localtunnel.com") . Is there any difference between them? Should I favor one over another? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou...
2006 Jul 10
4
Test Mongrel 0.3.13.4 Please
Hey Folks, There''s a nasty little bug in 0.3.13.3 when running in development mode which could cause all sorts of problems. Please grab the pre-release of 0.3.13.4 and tell me if it works for you: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Thanks! -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need
2005 Dec 30
6
Unable to get the domain in my routes.rb to map custom route tables per domain
...s empty in this case. I have tried a similar approach in one of my views, using the @request.domain(1) and that works PERFECT. Yet I have found no way to access the same @request.domain(1) within my routes.rb as the @request object has not been loaded yet. One thought was to use the ENV[''HTTP_HOST''] variable, but with my current LIGHTTPD setup, I do not have this environment variable around. Any help would be greatly appreciated. Regards, Nathaniel. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Nathaniel S. H. Brown http://nshb.net...
2016 Jul 27
2
Proxy
...on /stream1/ { proxy_buffering off; proxy_ignore_client_abort off; proxy_intercept_errors on; proxy_next_upstream error timeout invalid_header; proxy_redirect off; proxy_set_header X-Host $http_host; proxy_set_header X-Forwarded-For $remote_addr; proxy_connect_timeout 60; proxy_send_timeout 21600; proxy_read_timeout 21600; proxy_pass http://127.0.0.1:8000/stream1; } location /stream2/ {...
2017 Nov 13
0
Strrange behavior of VirtualHosts in Apache (CentOS6)
...So this becomes your default vhost when a match is not found and explains why the php file is invoked when the order of specificity falls through. > http://mail.example.org/ <-- works > http://smtp.example.org/ <-- doen't work > http://smtp.example.org/host.php <-- gives the HTTP_HOST (PHP-script), > but why? > > http://www.example.com/ <-- works > http://hello.example.com/ <-- doesn't work > http://hello.example.com/host.php <-- gives the HTTP_HOST (PHP-script), > but why...
2006 Jul 12
1
+ camping 1.4.123
...et environment variables and query vars. Blog.post(:Login, :input => {''username'' => ''admin'', ''password'' => ''camping''}) #=> #<Blog::Controllers::Login @user=... > Blog.get(:Info, :env => {:HTTP_HOST => ''wagon''}) #=> #<Blog::Controllers::Info @env={''HTTP_HOST''=>''wagon''} ...> * ~/.campingrc can contain database connection info if you want your default to be something other than SQLite. database: adapter:...
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. Is it possible? Any suggestions? Thanks! -- Posted vi...
2005 Dec 29
1
Using base HTML tag
Hello all: I have been using PHP for quite a bit and am beginning to learn more about RoR. One thing I used to to in PHP scripts (views in particular) was to have a tag such as: <base href="http://<?php echo $_SERVER[''HTTP_HOST''] . $_SERVER[''SCRIPT_NAME'']; ?>" /> so that URL rewriting would not throw off the paths to images, css, etc. Is there an equivalent way to do this in RoR? Thanks, John -- Posted via http://www.ruby-forum.com/.
2005 May 13
0
Apache config for Squirrelmail?
...eCond. # Do not process established ssl squirrelmail sessions RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} ^/webmail(/?|/.*)$ RewriteRule (^.*$) - [L,R] # Rewrite short form URLs whether SSL or not for forms # webmail.anything.dom and www.webmail.anything.dom RewriteCond %{HTTP_HOST} ^(www\.)?(webmail\.)(..+\.)(..+)$ [NC] RewriteCond %{REQUEST_URI} !^/webmail/ RewriteRule (^.*$) https://webmail.%3%4/webmail/ [L,R] # Force SSL otherwise RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} ^/webmail(/?|/.*)$ RewriteCond %{HTTP_HOST} ^(.*\.)?(..+\.)(..+)$ [N...
2009 Jun 25
1
request.host, proxy chains and HTTP_X_FORWARDED_HOST
...y2 Rails extracts the host by splitting this string and getting the last item: (actionpack-2.3.2\lib\action_controller\request.rb line 271) def raw_host_with_port if forwarded = env["HTTP_X_FORWARDED_HOST"] forwarded.split(/,\s?/).last else env[''HTTP_HOST''] || "#{env[''SERVER_NAME''] || env [''SERVER_ADDR'']}:#{env[''SERVER_PORT'']}" end end What happens is that we get proxy2 as the host. Shouldn''t it be trying to get the first item instead - forwarded.s...
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