Skip to content

Instantly share code, notes, and snippets.

View williamgomes's full-sized avatar
🎯
Focusing

William Gomes williamgomes

🎯
Focusing
View GitHub Profile
@williamgomes
williamgomes / craftcms.conf
Last active February 12, 2024 05:46
Minimal working Nginx conf for CraftCMS with CertBot SSL redirect
server {
##### this section is for redirecting any non-SSL request to SSL
listen 80;
server_name www.example.com example.com;
return 301 https://www.example.com$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
@williamgomes
williamgomes / config
Last active June 30, 2023 12:20
Nginx Config for Wordpress
###########
paste this inside virtual host file /etc/nginx/sites-available/<YOUR CONFIG FILE>
###########
server {
listen 80;
server_name <DOMAIN_OR_HOST_NAME>;
root /var/www/html/<FOLDER_NAME>;
@williamgomes
williamgomes / default.vcl
Created September 27, 2016 17:07
Varnish 4.0 default.vcl config with Wordpress and Nginx
# This is VCL file for Varnish 4.0.2 & Wordpress 4.0
#
# ASSUME The builtin VCL is called afterwards.
#
# Specify VCL new 4.0 format.
vcl 4.0;
# Imports
import std;
@williamgomes
williamgomes / craft:config:general.php
Last active June 30, 2023 12:20
how to configure nginx with craft (also multilingual)
<?php
/**
* General Configuration
*
* All of your system's general configuration settings go in here.
* You can see a list of the default settings in craft/app/etc/config/defaults/general.php
*/
return array(