Skip to content

Commit

Permalink
[ci skip] Fix capitalization
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay Vishnoi committed Jun 7, 2014
1 parent a6c8cde commit b6760d8
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/metal/streaming.rb
Expand Up @@ -183,7 +183,7 @@ module ActionController #:nodoc:
# You may also want to configure other parameters like <tt>:tcp_nodelay</tt>. # You may also want to configure other parameters like <tt>:tcp_nodelay</tt>.
# Please check its documentation for more information: http://unicorn.bogomips.org/Unicorn/Configurator.html#method-i-listen # Please check its documentation for more information: http://unicorn.bogomips.org/Unicorn/Configurator.html#method-i-listen
# #
# If you are using Unicorn with Nginx, you may need to tweak Nginx. # If you are using Unicorn with NGINX, you may need to tweak NGINX.
# Streaming should work out of the box on Rainbows. # Streaming should work out of the box on Rainbows.
# #
# ==== Passenger # ==== Passenger
Expand Down
4 changes: 2 additions & 2 deletions actionpack/lib/action_dispatch/middleware/remote_ip.rb
Expand Up @@ -11,7 +11,7 @@ module ActionDispatch
# Some Rack servers concatenate repeated headers, like {HTTP RFC 2616}[http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2] # Some Rack servers concatenate repeated headers, like {HTTP RFC 2616}[http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2]
# requires. Some Rack servers simply drop preceding headers, and only report # requires. Some Rack servers simply drop preceding headers, and only report
# the value that was {given in the last header}[http://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers]. # the value that was {given in the last header}[http://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers].
# If you are behind multiple proxy servers (like Nginx to HAProxy to Unicorn) # If you are behind multiple proxy servers (like NGINX to HAProxy to Unicorn)
# then you should test your Rack server to make sure your data is good. # then you should test your Rack server to make sure your data is good.
# #
# IF YOU DON'T USE A PROXY, THIS MAKES YOU VULNERABLE TO IP SPOOFING. # IF YOU DON'T USE A PROXY, THIS MAKES YOU VULNERABLE TO IP SPOOFING.
Expand Down Expand Up @@ -118,7 +118,7 @@ def initialize(env, middleware)
# #
# REMOTE_ADDR will be correct if the request is made directly against the # REMOTE_ADDR will be correct if the request is made directly against the
# Ruby process, on e.g. Heroku. When the request is proxied by another # Ruby process, on e.g. Heroku. When the request is proxied by another
# server like HAProxy or Nginx, the IP address that made the original # server like HAProxy or NGINX, the IP address that made the original
# request will be put in an X-Forwarded-For header. If there are multiple # request will be put in an X-Forwarded-For header. If there are multiple
# proxies, that header may contain a list of IPs. Other proxy services # proxies, that header may contain a list of IPs. Other proxy services
# set the Client-Ip header instead, so we check that too. # set the Client-Ip header instead, so we check that too.
Expand Down
8 changes: 4 additions & 4 deletions guides/code/getting_started/config/environments/production.rb
Expand Up @@ -16,10 +16,10 @@


# Enable Rack::Cache to put a simple HTTP cache in front of your application # Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this. # Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. # For large-scale production use, consider using a caching reverse proxy like NGINX, varnish or squid.
# config.action_dispatch.rack_cache = true # config.action_dispatch.rack_cache = true


# Disable Rails's static asset server (Apache or nginx will already do this). # Disable Rails's static asset server (Apache or NGINX will already do this).
config.serve_static_assets = false config.serve_static_assets = false


# Compress JavaScripts and CSS. # Compress JavaScripts and CSS.
Expand All @@ -36,8 +36,8 @@
config.assets.version = '1.0' config.assets.version = '1.0'


# Specifies the header that your server uses for sending files. # Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX


# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true # config.force_ssl = true
Expand Down
2 changes: 1 addition & 1 deletion guides/source/3_1_release_notes.md
Expand Up @@ -173,7 +173,7 @@ The assets pipeline is powered by [Sprockets](https://github.com/sstephenson/spr


### HTTP Streaming ### HTTP Streaming


HTTP Streaming is another change that is new in Rails 3.1. This lets the browser download your stylesheets and JavaScript files while the server is still generating the response. This requires Ruby 1.9.2, is opt-in and requires support from the web server as well, but the popular combo of nginx and unicorn is ready to take advantage of it. HTTP Streaming is another change that is new in Rails 3.1. This lets the browser download your stylesheets and JavaScript files while the server is still generating the response. This requires Ruby 1.9.2, is opt-in and requires support from the web server as well, but the popular combo of NGINX and Unicorn is ready to take advantage of it.


### Default JS library is now jQuery ### Default JS library is now jQuery


Expand Down
16 changes: 8 additions & 8 deletions guides/source/asset_pipeline.md
Expand Up @@ -794,7 +794,7 @@ For Apache:
</Location> </Location>
``` ```


For nginx: For NGINX:


```nginx ```nginx
location ~ ^/assets/ { location ~ ^/assets/ {
Expand All @@ -816,7 +816,7 @@ compression ratio, thus reducing the size of the data transfer to the minimum.
On the other hand, web servers can be configured to serve compressed content On the other hand, web servers can be configured to serve compressed content
directly from disk, rather than deflating non-compressed files themselves. directly from disk, rather than deflating non-compressed files themselves.


Nginx is able to do this automatically enabling `gzip_static`: NGINX is able to do this automatically enabling `gzip_static`:


```nginx ```nginx
location ~ ^/(assets)/ { location ~ ^/(assets)/ {
Expand All @@ -835,7 +835,7 @@ the module compiled. Otherwise, you may need to perform a manual compilation:
./configure --with-http_gzip_static_module ./configure --with-http_gzip_static_module
``` ```


If you're compiling nginx with Phusion Passenger you'll need to pass that option If you're compiling NGINX with Phusion Passenger you'll need to pass that option
when prompted. when prompted.


A robust configuration for Apache is possible but tricky; please Google around. A robust configuration for Apache is possible but tricky; please Google around.
Expand Down Expand Up @@ -920,7 +920,7 @@ cache forever. This can cause problems. If you use


Every cache is different, so evaluate how your CDN handles caching and make sure Every cache is different, so evaluate how your CDN handles caching and make sure
that it plays nicely with the pipeline. You may find quirks related to your that it plays nicely with the pipeline. You may find quirks related to your
specific set up, you may not. The defaults nginx uses, for example, should give specific set up, you may not. The defaults NGINX uses, for example, should give
you no problems when used as an HTTP cache. you no problems when used as an HTTP cache.


If you want to serve only some assets from your CDN, you can use custom If you want to serve only some assets from your CDN, you can use custom
Expand Down Expand Up @@ -1024,12 +1024,12 @@ this passes responsibility for serving the file to the web server, which is
faster. Have a look at [send_file](http://api.rubyonrails.org/classes/ActionController/DataStreaming.html#method-i-send_file) faster. Have a look at [send_file](http://api.rubyonrails.org/classes/ActionController/DataStreaming.html#method-i-send_file)
on how to use this feature. on how to use this feature.


Apache and nginx support this option, which can be enabled in Apache and NGINX support this option, which can be enabled in
`config/environments/production.rb`: `config/environments/production.rb`:


```ruby ```ruby
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
``` ```


WARNING: If you are upgrading an existing application and intend to use this WARNING: If you are upgrading an existing application and intend to use this
Expand All @@ -1039,7 +1039,7 @@ and any other environments you define with production behavior (not


TIP: For further details have a look at the docs of your production web server: TIP: For further details have a look at the docs of your production web server:
- [Apache](https://tn123.org/mod_xsendfile/) - [Apache](https://tn123.org/mod_xsendfile/)
- [Nginx](http://wiki.nginx.org/XSendfile) - [NGINX](http://wiki.nginx.org/XSendfile)


Assets Cache Store Assets Cache Store
------------------ ------------------
Expand Down
2 changes: 1 addition & 1 deletion guides/source/caching_with_rails.md
Expand Up @@ -28,7 +28,7 @@ config.action_controller.perform_caching = true


### Page Caching ### Page Caching


Page caching is a Rails mechanism which allows the request for a generated page to be fulfilled by the webserver (i.e. Apache or nginx), without ever having to go through the Rails stack at all. Obviously, this is super-fast. Unfortunately, it can't be applied to every situation (such as pages that need authentication) and since the webserver is literally just serving a file from the filesystem, cache expiration is an issue that needs to be dealt with. Page caching is a Rails mechanism which allows the request for a generated page to be fulfilled by the webserver (i.e. Apache or NGINX), without ever having to go through the Rails stack at all. Obviously, this is super-fast. Unfortunately, it can't be applied to every situation (such as pages that need authentication) and since the webserver is literally just serving a file from the filesystem, cache expiration is an issue that needs to be dealt with.


INFO: Page Caching has been removed from Rails 4. See the [actionpack-page_caching gem](https://github.com/rails/actionpack-page_caching). See [DHH's key-based cache expiration overview](http://signalvnoise.com/posts/3113-how-key-based-cache-expiration-works) for the newly-preferred method. INFO: Page Caching has been removed from Rails 4. See the [actionpack-page_caching gem](https://github.com/rails/actionpack-page_caching). See [DHH's key-based cache expiration overview](http://signalvnoise.com/posts/3113-how-key-based-cache-expiration-works) for the newly-preferred method.


Expand Down
10 changes: 5 additions & 5 deletions guides/source/configuring.md
Expand Up @@ -120,7 +120,7 @@ numbers. New applications filter out passwords by adding the following `config.f


* `secrets.secret_key_base` is used for specifying a key which allows sessions for the application to be verified against a known secure key to prevent tampering. Applications get `secrets.secret_key_base` initialized to a random key present in `config/secrets.yml`. * `secrets.secret_key_base` is used for specifying a key which allows sessions for the application to be verified against a known secure key to prevent tampering. Applications get `secrets.secret_key_base` initialized to a random key present in `config/secrets.yml`.


* `config.serve_static_assets` configures Rails itself to serve static assets. Defaults to true, but in the production environment is turned off as the server software (e.g. Nginx or Apache) used to run the application should serve static assets instead. Unlike the default setting set this to true when running (absolutely not recommended!) or testing your app in production mode using WEBrick. Otherwise you won't be able use page caching and requests for files that exist regularly under the public directory will anyway hit your Rails app. * `config.serve_static_assets` configures Rails itself to serve static assets. Defaults to true, but in the production environment is turned off as the server software (e.g. NGINX or Apache) used to run the application should serve static assets instead. Unlike the default setting set this to true when running (absolutely not recommended!) or testing your app in production mode using WEBrick. Otherwise you won't be able use page caching and requests for files that exist regularly under the public directory will anyway hit your Rails app.


* `config.session_store` is usually set up in `config/initializers/session_store.rb` and specifies what class to use to store the session. Possible values are `:cookie_store` which is the default, `:mem_cache_store`, and `:disabled`. The last one tells Rails not to deal with sessions. Custom session stores can also be specified: * `config.session_store` is usually set up in `config/initializers/session_store.rb` and specifies what class to use to store the session. Possible values are `:cookie_store` which is the default, `:mem_cache_store`, and `:disabled`. The last one tells Rails not to deal with sessions. Custom session stores can also be specified:


Expand Down Expand Up @@ -729,7 +729,7 @@ Rails will now prepend "/app1" when generating links.


#### Using Passenger #### Using Passenger


Passenger makes it easy to run your application in a subdirectory. You can find the relevant configuration in the [passenger manual](http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri). Passenger makes it easy to run your application in a subdirectory. You can find the relevant configuration in the [Passenger manual](http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri).


#### Using a Reverse Proxy #### Using a Reverse Proxy


Expand All @@ -739,11 +739,11 @@ Many modern web servers can be used as a proxy server to balance third-party ele


One such application server you can use is [Unicorn](http://unicorn.bogomips.org/) to run behind a reverse proxy. One such application server you can use is [Unicorn](http://unicorn.bogomips.org/) to run behind a reverse proxy.


In this case, you would need to configure the proxy server (nginx, apache, etc) to accept connections from your application server (Unicorn). By default Unicorn will listen for TCP connections on port 8080, but you can change the port or configure it to use sockets instead. In this case, you would need to configure the proxy server (NGINX, Apache, etc) to accept connections from your application server (Unicorn). By default Unicorn will listen for TCP connections on port 8080, but you can change the port or configure it to use sockets instead.


You can find more information in the [Unicorn readme](http://unicorn.bogomips.org/README.html) and understand the [philosophy](http://unicorn.bogomips.org/PHILOSOPHY.html) behind it. You can find more information in the [Unicorn readme](http://unicorn.bogomips.org/README.html) and understand the [philosophy](http://unicorn.bogomips.org/PHILOSOPHY.html) behind it.


Once you've configured the application server, you must proxy requests to it by configuring your web server appropriately. For example your nginx config may include: Once you've configured the application server, you must proxy requests to it by configuring your web server appropriately. For example your NGINX config may include:


``` ```
upstream application_server { upstream application_server {
Expand All @@ -769,7 +769,7 @@ server {
} }
``` ```


Be sure to read the [nginx documentation](http://nginx.org/en/docs/) for the most up-to-date information. Be sure to read the [NGINX documentation](http://nginx.org/en/docs/) for the most up-to-date information.


#### Considerations when deploying to a subdirectory #### Considerations when deploying to a subdirectory


Expand Down
Expand Up @@ -16,10 +16,10 @@ Rails.application.configure do


# Enable Rack::Cache to put a simple HTTP cache in front of your application # Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this. # Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. # For large-scale production use, consider using a caching reverse proxy like NGINX, varnish or squid.
# config.action_dispatch.rack_cache = true # config.action_dispatch.rack_cache = true


# Disable Rails's static asset server (Apache or nginx will already do this). # Disable Rails's static asset server (Apache or NGINX will already do this).
config.serve_static_assets = false config.serve_static_assets = false


<%- unless options.skip_sprockets? -%> <%- unless options.skip_sprockets? -%>
Expand All @@ -37,8 +37,8 @@ Rails.application.configure do
<%- end -%> <%- end -%>


# Specifies the header that your server uses for sending files. # Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX


# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true # config.force_ssl = true
Expand Down

0 comments on commit b6760d8

Please sign in to comment.