ygkanani

Nginx config for phplist

Jul 12th, 2016
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.84 KB | None | 0 0
  1. server {
  2.     listen       8080;
  3.     server_name  mydomain.com;
  4.     root /var/www/PHPList/public_html/;
  5.     index index.php;
  6.  
  7.     access_log  /usr/local/etc/nginx/logs/default.access.log  main;
  8.     error_log  /usr/local/etc/nginx/logs/default.error.log;
  9.  
  10.     location / {
  11.         try_files $uri $uri.php $uri/ /index.php?$args;
  12.     }
  13.  
  14.     include   /usr/local/etc/nginx/conf.d/php-fpm;
  15.    
  16.     location ~ \.php$ {
  17.         try_files $uri = 404;
  18.         #include /etc/nginx/fastcgi_params;
  19.         fastcgi_pass 127.0.0.1:9000;
  20.         fastcgi_index index.php;
  21.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22.     }
  23.    
  24.     location = /info {
  25.         allow   127.0.0.1;
  26.         deny    all;
  27.         rewrite (.*) /.info.php;
  28.     }
  29.  
  30.     error_page  404     /404.html;
  31.     error_page  403     /403.html;
  32. }
Add Comment
Please, Sign In to add comment