Skip to content

Instantly share code, notes, and snippets.

View i-amolo's full-sized avatar

Innocent J. Blacius i-amolo

View GitHub Profile
@i-amolo
i-amolo / Dockerfile
Created August 19, 2024 17:20 — forked from avandrevitor/Dockerfile
Docker PHP 7.2 Apache
FROM php:7.2.10-apache
LABEL maintainer='André Vitor Cuba de Miranda <[email protected]'
# Update and Download Packages Debian
RUN apt-get update --yes
# Install Dependencies
RUN apt-get install --yes \
autoconf \
@i-amolo
i-amolo / certificate-self-signed.sh
Created August 19, 2024 17:19 — forked from avandrevitor/certificate-self-signed.sh
Certificado Auto Assinado
#!/bin/bash
openssl req \
--newkey rsa:4096 --nodes -sha256 -keyout certs/domain.key \
-x509 -days 365 -out certs/domain.crt
@i-amolo
i-amolo / generate_docker_cert.sh
Created August 19, 2024 17:19 — forked from avandrevitor/generate_docker_cert.sh
Generate trusted CA certificates for running Docker with HTTPS
#!/bin/bash
#
# Generates client and server certificates used to enable HTTPS
# remote authentication to a Docker daemon.
#
# See http://docs.docker.com/articles/https/
#
# To start the Docker Daemon:
#
# sudo docker -d \
@i-amolo
i-amolo / nginxproxy.md
Created August 19, 2024 17:17 — forked from avandrevitor/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@i-amolo
i-amolo / .gitignore
Created July 9, 2024 17:44 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@i-amolo
i-amolo / nginx.conf
Created June 21, 2024 14:21 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@i-amolo
i-amolo / nginx.conf
Created April 10, 2024 21:08 — forked from weapp/nginx.conf
Return common errors as json in Nginx
error_page 500 /500.html;
location /500.html{
return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}';
}
error_page 502 /502.html;
location /502.html{
return 502 '{"error": {"status_code": 502,"status": "Bad Gateway"}}';
}
@i-amolo
i-amolo / !Nginx Basic Auth.md
Created April 10, 2024 21:05 — forked from laurentbel/!Nginx Basic Auth.md
Nginx reverse proxy with basic authentication

Nginx Basic Auth

A simple demo of using Nginx as a reverse proxy to add basic authentication.

@i-amolo
i-amolo / API.md
Created February 18, 2024 16:37 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@i-amolo
i-amolo / mysql_root_password_changes_on_centos7.txt
Created February 14, 2024 10:25 — forked from kangmasjuqi/mysql_root_password_changes_on_centos7.txt
Change/Reset MySQL Root password on Centos 7
https://stackoverflow.com/questions/33510184/change-mysql-root-password-on-centos7/34207996#34207996
1. Stop mysql:
systemctl stop mysqld
2. Set the mySQL environment option
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
3. Start mysql usig the options you just set
systemctl start mysqld