Summary of the steps to get a Ubuntu 16.04 production server running with LAMP, multiple virtual hosts and Let's Encrypt SSL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Non-alcoholic Pina Colada</title> | |
<script type="application/ld+json"> | |
{ | |
"@context": "https://schema.org/", | |
"@type": "Recipe", | |
"name": "Non-alcoholic Pina Colada", | |
"image": [ | |
"https://example.com/photos/1x1/photo.jpg", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name HOSTNAME; | |
root /opt/PATH/; | |
index index.html; | |
rewrite ^/$ /en/PATH/ redirect; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetEnvIf Origin "^(.*\.example\.com)$" ORIGIN_SUB_DOMAIN=$1 | |
Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Install ISPConfig + NGINX + PHP 7.1 on Debian 9 x64 (Stretch) | |
## Filesystem ext4 | |
## Run as root | |
## Based on: https://www.howtoforge.com/tutorial/perfect-server-debian-jessie-nginx-bind-dovecot-ispconfig-3.1/ | |
## and: https://www.howtoforge.com/tutorial/perfect-server-debian-9-stretch-apache-bind-dovecot-ispconfig-3-1/ | |
## ! For Postfix config see https://www.howtoforge.com/tutorial/perfect-server-debian-9-stretch-apache-bind-dovecot-ispconfig-3-1/ | |
# Check if user has root privileges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
hostname: <your hostname> | |
ssh_authorized_keys: | |
- ssh-rsa < your Public SSH key AAAAB3NzaC1... > | |
coreos: | |
etcd: | |
addr: $private_ipv4:4001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Application level Controller | |
*/ | |
App::uses('Controller', 'Controller'); | |
// Controller Ejemplo | |
class AppController extends Controller { | |
public function index(){ |
NewerOlder