Commit e3f2222d1c0b057478e4f6409a4d62434f0f6712

Authored by Macartur Sousa
1 parent 1099eaa1
Exists in fix_last_path

Added exemple to use nginx +remote_user+ sinatra

Showing 1 changed file with 27 additions and 0 deletions   Show diff stats
test_notes.txt
1 1 Configurando apache para setar header Remote-User:
2 2  
  3 +--- USING APACHE2 ---
  4 +
3 5 1 - Instalar apache2
4 6 2 - Criar arquivo de configuração (ex: proxy.conf) em /etc/apache2/sites-available
5 7  
... ... @@ -25,3 +27,28 @@ Executando aplicação sinatra:
25 27  
26 28 1 - Entrar no diretório que contem o arquivo conf.ru
27 29 2 - Executar aplicação (rackup)
  30 +
  31 +
  32 +-- USING NGINX --
  33 +
  34 +sudo apt-get install nginx
  35 +
  36 +editar um arquivo de configuração em /etc/nginx/sites-available/proxy.conf
  37 + e criar um link para /etc/nginx/sites-enable/proxy.conf com o conteudo:
  38 +
  39 +server {
  40 + server_name 127.0.0.1;
  41 + listen 80;
  42 + location / {
  43 + proxy_pass http://127.0.0.1:9292;
  44 + proxy_set_header Host $http_host;
  45 + proxy_set_header REMOTE_USER "<usuário>";
  46 + }
  47 +}
  48 +
  49 +Executando aplicação sinatra:
  50 +
  51 +1 - Entrar no diretório que contem o arquivo conf.ru
  52 +2 - Executar aplicação (rackup)
  53 +
  54 +------------------
... ...