Skip to content

Instantly share code, notes, and snippets.

@pujianto
pujianto / nginx-static-files.conf
Created March 31, 2022 04:16
WHM Serve static files directly from Nginx and fallback to apache if file no found. (WHM with Nginx Proxy Installed)
# Place this file inside /etc/nginx/conf.d/server-includes/
location @httpd_fallback {
proxy_pass $scheme://$CPANEL_APACHE_PROXY_REQ_IP:$CPANEL_APACHE_PROXY_REQ_PORT;
}
location ~ \.(gif|jpg|jpeg|png|css|js|svg|webm|webp)$ {
expires 30d;
add_header Vary Accept-Encoding;
access_log off;
@pujianto
pujianto / tailwind-webpack-setup.md
Created October 20, 2023 05:50 — forked from bradtraversy/tailwind-webpack-setup.md
Setup Webpack with Tailwind CSS

Webpack & Tailwind CSS Setup

Create your package.json

npm init -y

Create your src folder

Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.