Skip to content

Instantly share code, notes, and snippets.

@uZer
Created September 16, 2014 11:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uZer/2c744a5117b4c35c306b to your computer and use it in GitHub Desktop.
Save uZer/2c744a5117b4c35c306b to your computer and use it in GitHub Desktop.
Basic ProxyPass Nginx
server {
listen 80;
listen [::]:80;
server_name exmample.com;
index index.php;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:5050;
}
location ~* \.(?:ico|css|gif|jpe?g|png|ttf|woff)$ {
access_log off;
expires 30d;
add_header Pragma public;
add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
proxy_pass http://127.0.0.1:5050;
}
include /etc/nginx/global/security.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment