Skip to content

Instantly share code, notes, and snippets.

View misaon's full-sized avatar
🏠
Working from home

Ondřej Misák misaon

🏠
Working from home
View GitHub Profile
@misaon
misaon / ubuntu-16.04-vps-nginx-setup.md
Last active January 10, 2018 09:39
Lightweight and speed VPS - Nginx/PHP/MySQL setup (with tweaks) for Ubuntu 16.04

Simple and quick VPS setup for Ubuntu 16.04 (64-bit)

VPS icon

Before install

This VPS configuration is great for Nette framework.

The setup installs the following software:

  • Nginx (latest stable version)
@pedrosanta
pedrosanta / docker-compose.yml
Created July 15, 2017 14:36
A base docker compose file for PHP + Apache
version: '2'
services:
php-apache:
image: php:apache
ports:
- "80:80"
volumes:
- $PWD:/var/www/html
@khoatran
khoatran / scaling_php_application.conf
Last active December 28, 2021 13:20
Configuring Nginx to be a Cache for PHP-FPM
# This is the sample from Scaling PHP applications book
#Set the path where the cache is stored; Set the zone name(my_app), totalsize (100m),and max life time(60m)
fastcgi_cache_path /tmp/cachelevels=1:2keys_zone=my_app:100minactive=60m;
#Set the cache key used,in this case: httpsGETtest.com/somepage.html
fastcgi_cache_key "$scheme$request_method$host$request_uri";
server{
listen 80;
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active September 29, 2024 08:31
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@nurrony
nurrony / compile-nginx-from-source.sh
Last active September 27, 2019 11:00
All configuration files needed to install nginx on Ubuntu 16.04 Compile Nginx from source with nginx-rtmp-module, pagespeed and cache-purge module.
#change it to latest version
NPS_VERSION=1.11.33.0;
echo "Changing Directory to $HOME..."
cd $HOME;
echo "Nginx version to install: " && \
read NGINX_VERSION && \
echo "Downloading nginx-$NGINX_VERSION..." && \
wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz && \
echo "Installing Nginx Dependencies..." && \
@curtismcmullan
curtismcmullan / setup_selenium.sh
Last active May 2, 2023 22:56
Setup Selenium Server on Ubuntu 14.04
#!/bin/bash
# Following the guide found at this page
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html
echo "\r\nUpdating system ...\r\n"
sudo apt-get update
# Create folder to place selenium in
@ampedandwired
ampedandwired / README.md
Last active October 6, 2022 06:40
webpack-dev-server with html-webpack-plugin
$ npm install
$ ./node_modules/.bin/webpack-dev-server
$ open http://localhost:8080/webpack-dev-server/

Notes:

  • Note the trailing slash on the URL is significant. Without it webpack-dev-server shows a file listing page.
  • You need 1.0.11 or later of webpack-dev-middleware for this URL to work. With earlier versions you need to specify the full URL like this: http://localhost:8080/webpack-dev-server/index.html.
  • To get a non-autoreloading version of the page use http://localhost:8080/index.html.
@hrach
hrach / nginx.conf
Created June 9, 2014 20:50
nginx + Nette framework rewrite
server {
listen 80;
server_name example.com;
root d:/webs/example.com/www;
index index.php index.html;
try_files $uri $uri/ /index.php?$args;
location ~ \.phpt?$ {
try_files $uri @missing;
@magnetikonline
magnetikonline / README.md
Last active September 5, 2024 14:55
Setting Nginx FastCGI response buffer sizes.
@Great-Antique
Great-Antique / common.conf
Last active August 19, 2021 02:37 — forked from jsifalda/common.conf
Nginx configuration for web application powered by Nette framework
# Please paste to folder common/common.conf
index index.html index.htm;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
#location ~ \.(js|ico|gif|jpg|png|css|rar|zip|tar\.gz)$ { }