Advertisement
BimoSora

nginx

Nov 26th, 2019
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. server {
  2. listen 103.129.222.194:443 ssl;
  3.  
  4. root /usr/share/nginx/webserver/gonit;
  5. index index.html index.htm index.nginx-debian.html index.php;
  6.  
  7. server_name www.gonitechnology.com;
  8.  
  9. # ssl on;
  10. ssl_certificate /etc/cloudflare/Gonit.pem;
  11. ssl_certificate_key /etc/cloudflare/Gonit.key;
  12.  
  13. location / {
  14. if (!-e $request_filename){
  15. rewrite ^(.*)$ /$1.php;
  16. }
  17. }
  18.  
  19. location /id {
  20. if (!-e $request_filename){
  21. rewrite ^(.*)$ /$1.php;
  22.  
  23. rewrite /id/lihat-pekerjaan/([^/]*)/([^/]*)/([^/]*)$ /id/lihat-pekerjaan.php?id=$1&date=$2&slug=$3 break;
  24.  
  25. }
  26. error_page 400 401 402 403 404 405 406 407 408 409 410 500 501 502 503 504 505 506 507 508 509 510 https://www.gonitechnology.com/id/error;
  27. }
  28.  
  29. location ~ \.php$ {
  30. try_files $uri = 404;
  31. include fastcgi_params;
  32. fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  33. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  34. fastcgi_intercept_errors on;
  35. fastcgi_split_path_info ^(.+\.php)(.*)$;
  36.  
  37. fastcgi_hide_header X-Powered-By;
  38. }
  39.  
  40. location ~ /\.ht {
  41. deny all;
  42. }
  43.  
  44. location ~ \.css {
  45. add_header Content-Type text/css;
  46. }
  47.  
  48. location ~ \.js {
  49. add_header Content-Type application/x-javascript;
  50. }
  51.  
  52. location ~ \.(jpg|jpeg|gif|png|ico|html|xml|txt)$ {
  53.  
  54. }
  55. }
  56.  
  57. server {
  58. listen 103.129.222.194:443 ssl;
  59. server_name gonitechnology.com;
  60. return 301 $scheme://www.gonitechnology.com$request_uri;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement