Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aloskutov/nginx-ssl-php-db
https://github.com/aloskutov/nginx-ssl-php-db
adminer docker docker-compose localhost mariadb nginx php-fpm postgres postgresql ssl
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/aloskutov/nginx-ssl-php-db
- Owner: aloskutov
- Created: 2020-12-19T05:12:42.000Z (about 4 years ago)
- Default Branch: db-mariadb
- Last Pushed: 2021-01-18T15:22:17.000Z (about 4 years ago)
- Last Synced: 2024-11-21T20:44:20.482Z (3 months ago)
- Topics: adminer, docker, docker-compose, localhost, mariadb, nginx, php-fpm, postgres, postgresql, ssl
- Language: PHP
- Homepage:
- Size: 67.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nginx-ssl-php-db
Local development environment: nginx + SSL + php + mariadb + adminer## Project tree
├───conf
│ ├───certs
│ ├───mariadb
│ ├───nginx
│ │ └───conf.d
│ └───php
├───logs
│ ├───mariadb
│ ├───nginx
│ └───php
├───mariadb
└───src## Docker Images
+ [PHP:fpm-alpine](https://hub.docker.com/_/php)
+ [MariaDB](https://hub.docker.com/_/mariadb)
+ [Nginx:alpine](https://hub.docker.com/_/nginx)
+ [Adminer](https://hub.docker.com/_/adminer)This project use the following ports:
| Server | Port |
|------------|------|
| MariaDB | 3306 |
| Adminer | 8080 |
| Nginx | 80 |
| Nginx SSL | 433 |
| PHP-FPM | 9000 |# SSL for localhost
Install mkcert.
```shell
choco install mkcert
```Install RootCA
```shell
mkcert -install
```Create certificates for localhost (or other hostname)
```shell
mkcert localhost
```Copy them to /conf/certs and change nginx [config](conf/nginx/localhost.conf) options
ssl_certificate
andssl_certificate_key
```nginx
ssl_certificate /etc/nginx/certs/localhost.pem;
ssl_certificate_key /etc/nginx/certs/localhost-key.pem;
```## Set localhost certificates in Firefox
Manually install the rootCA in firefox through firefox's cert manager (If it is not listed). Prefences -> Privacy & Security -> Certificates -> View Certificates -> Authorities (Tab) -> Import
![Firefox Certificate Manager](firefox-1.png)
Select certificate and set trust settings "Edit Trust..." -> set "This certificate can identify websites." -> ok
![Edit CA certificate trust settings](firefox-2.png)
---
- [How to Get HTTPS Working in Windows 10 Localhost Dev Environment](https://zeropointdevelopment.com/how-to-get-https-working-in-windows-10-localhost-dev-environment/)
- [How to create an HTTPS certificate for localhost domains](https://gist.github.com/cecilemuller/9492b848eb8fe46d462abeb26656c4f8)
- [How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)](https://gist.github.com/cecilemuller/a26737699a7e70a7093d4dc115915de8)