Skip to content

Instantly share code, notes, and snippets.

@BlaShadow
Last active December 27, 2015 23:18
Show Gist options
  • Save BlaShadow/7404564 to your computer and use it in GitHub Desktop.
Save BlaShadow/7404564 to your computer and use it in GitHub Desktop.
Conf file to put Apache behind nginx.
server{
listen 80;
root /var/www/path/public;
index index.php index.html index.htm;
server_name server_name.dev;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
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:88;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment