Advertisement
RussianSysOps

nginx front-end for apache cfg

Jan 3rd, 2018
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.38 KB | None | 0 0
  1. server {
  2.  listen 80;
  3.  
  4. root /var/www/html/;
  5.  index index.php index.html index.htm;
  6.  
  7. server_name _;
  8.  
  9. location / {
  10.  try_files $uri $uri/ /index.php;
  11.  }
  12.  
  13. location ~ \.php$ {
  14.  
  15.  proxy_set_header X-Real-IP $remote_addr;
  16.  proxy_set_header X-Forwarded-For $remote_addr;
  17.  proxy_set_header Host $host;
  18.  proxy_pass http://127.0.0.1:8080;
  19.  
  20. }
  21.  
  22. location ~ /\.ht {
  23.  deny all;
  24.  }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement