Skip to content

Instantly share code, notes, and snippets.

@juanplanisys
Created April 30, 2015 15:25
Show Gist options
  • Save juanplanisys/a1bcb913e8c858be681f to your computer and use it in GitHub Desktop.
Save juanplanisys/a1bcb913e8c858be681f to your computer and use it in GitHub Desktop.
Config Nginx
server {
server_name app.local
location /admin/ {
access_log /var/log/nginx/admin.access.log;
error_log /var/log/nginx/admin.error.log;
alias /home/user/frontend/admin_frontend/public/;
try_files $uri $uri/ /index.html;
if (!-e $request_filename){
rewrite ^/admin/(.+)$ /admin/index.html last;
}
}
location ~ ^/(api).*$ {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment