Advertisement
AhmadFazliIsmail

Nginx conf file for Syafiq Faiz

Sep 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.27 KB | None | 0 0
  1. server {
  2.     server_name test.wa-essence.com;
  3.     root /var/www/test_wa_essence;
  4.     index index.php index.html index.htm;
  5.  
  6.     location / {
  7.         try_files $uri $uri/ /index.php$is_args$args;
  8.     }
  9.  
  10.     #location /wachampionacademy {
  11.     # Tak perlu isi apa2 dah sini. Ini adalah subfolder untuk /var/www/test_wa_essence dan bukan sub-domain name. Sub-domain name contohnya macam test2.wa-essence.com , test3.wa-essence.com . Just manual install je WordPress lain kat sini. Upload installer dia & follow the installation steps.
  12.     #}
  13.  
  14.     location ~ \.php$ {
  15.         include snippets/fastcgi-php.conf;
  16.         fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  17.     }
  18.  
  19.     location ~ \.php$ {
  20.         include snippets/fastcgi-php.conf;
  21.         fastcgi_param SCRIPT_FILENAME $request_filename;
  22.         fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  23.     }
  24.  
  25.     location ~ /\.ht {
  26.         deny all;
  27.     }
  28.  
  29.     location = /favicon.ico { log_not_found off; access_log off; }
  30.     location = /robots.txt { log_not_found off; access_log off; allow all; }
  31.     location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
  32.         expires max;
  33.         log_not_found off;
  34.     }
  35.  
  36. # SSL port 443 tu kena buka server block baru, kalau masih baru dalam Nginx better asingkan ngan port 80.
  37. # If better jangan pakai. Rujuk sini https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement