Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name test.wa-essence.com;
- location / {
- root /var/www/test_wa_essence;
- index index.php index.html index.htm;
- # Pilih mana2 1 je antara yg bawah ni. Dedua ni sama, so check mana yg compatible ngan ko punya PHP-FPM config.
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
- }
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
- }
- try_files $uri $uri/ /index.php$is_args$args;
- }
- location /wachampionacademy {
- root /var/www/;
- index index.php index.html index.htm;
- # Pilih mana2 1 je antara yg bawah ni. Dedua ni sama, so check mana yg compatible ngan ko punya PHP-FPM config.
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
- }
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
- }
- try_files $uri $uri/ /wachampionacademy/index.php$is_args$args;
- }
- location ~ /\.ht {
- deny all;
- }
- location = /favicon.ico { log_not_found off; access_log off; }
- location = /robots.txt { log_not_found off; access_log off; allow all; }
- location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
- expires max;
- log_not_found off;
- }
- # SSL port 443 tu kena buka server block baru, kalau masih baru dalam Nginx better asingkan ngan port 80.
- # If better jangan pakai. Rujuk sini https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement