Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. server {
  2. listen 80;
  3. root /data/example.com/www;
  4. index index.php index.html index.htm;
  5.  
  6.  
  7. autoindex off;
  8. location = /rewrite.php {
  9. rewrite ^(.*)$ /installation/tests/apache_rewrite.php break;
  10. }
  11. location /action {
  12. rewrite ^/action\/([A-Za-z0-9\_\-\/]+)$ /system/handlers/actions.php?action=$1&$query_string break;
  13. }
  14. location / {
  15. if (!-e $request_filename){
  16. rewrite ^/([A-Za-z0-9\_\-]+)$ /index.php?h=$1 break;
  17. }
  18. if (!-e $request_filename){
  19. rewrite ^/([A-Za-z0-9\_\-]+)\/(.*)$ /index.php?h=$1&p=$2 break;
  20. }
  21. }
  22.  
  23. location /error_log {
  24. deny all;
  25. }
  26. location ~ (nginx|htaccess).dist {
  27. deny all;
  28. }
  29.  
  30. location ~ \.php$ {
  31. try_files $uri =404;
  32. fastcgi_pass unix:/var/run/php5-fpm.sock;
  33. fastcgi_index index.php;
  34. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  35. include fastcgi_params;
  36.  
  37. }
  38. }
  39. server {
  40. listen 443 ssl default_server;
  41. listen [::]:443 ssl default_server;
  42. server_tokens off;
  43. server_name example.com www.example.com;
  44. root /data/example.com/www;
  45. index index.php index.html index.htm;
  46. ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
  47. ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement