Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ftmahringer/lamp-namp-red
A modern web development stack combining LAMP (Linux, Apache, MariaDB, PHP) and NAMP (Nginx, Apache, MariaDB, PHP) with Redis for caching. Powered by Docker for easy deployment.
https://github.com/ftmahringer/lamp-namp-red
apache docker mariadb nginx php redis
Last synced: 1 day ago
JSON representation
A modern web development stack combining LAMP (Linux, Apache, MariaDB, PHP) and NAMP (Nginx, Apache, MariaDB, PHP) with Redis for caching. Powered by Docker for easy deployment.
- Host: GitHub
- URL: https://github.com/ftmahringer/lamp-namp-red
- Owner: FTMahringer
- Created: 2025-02-12T11:49:28.000Z (3 days ago)
- Default Branch: master
- Last Pushed: 2025-02-12T12:19:42.000Z (3 days ago)
- Last Synced: 2025-02-12T12:53:54.571Z (3 days ago)
- Topics: apache, docker, mariadb, nginx, php, redis
- Language: Dockerfile
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LAMP-NAMP-RED 🚀
A powerful and flexible development stack that combines **LAMP (Linux, Apache, MariaDB, PHP)** and **NAMP (Nginx, Apache, MariaDB, PHP)** with **Redis** for caching. This setup enables efficient web application hosting, load balancing, and database management.## 📌 Features
- **Nginx as a reverse proxy** for Apache
- **Apache with PHP-FPM** for processing PHP requests
- **MariaDB** as the relational database
- **phpMyAdmin** for database administration
- **Redis** for caching and session management
- **Docker-based environment** for easy setup and deployment---
## 🏷️ **Project Structure**
```
/lamp-namp-red
│── /app # Application code (HTML, PHP, etc.)
│── /nginx # Nginx configuration
│ ├── nginx.conf
│── /php/apache # Apache with PHP
│── /php/fpm # PHP-FPM setup
│── docker-compose.yml # Docker Compose file
│── httpd.conf # Apache configuration
│── index.php # Test PHP script
```---
## ⚙️ **Setup & Installation**
### 1️⃣ Prerequisites
Ensure you have the following installed:
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)### 2️⃣ Clone the Repository
```sh
git clone https://github.com/ftmahringer/lamp-namp-red.git
cd lamp-namp-red
```### 3️⃣ Start the Services
```sh
docker-compose up -d
```
This will:
- Start **Nginx** on port `9090`
- Start **Apache** on port `9091`
- Start **MariaDB** on port `4306`
- Start **phpMyAdmin** on port `9092`
- Start **Redis** on port `6379`### 4️⃣ Test the Setup
- Open **http://localhost:9090** → Nginx (Reverse Proxy to Apache)
- Open **http://localhost:9091** → Apache (Direct Access)
- Open **http://localhost:9092** → phpMyAdmin (Login: `user / password`)---
## 🔧 **Configuration**
### 🎥 **Nginx Configuration (`nginx/nginx.conf`)**
Nginx acts as a reverse proxy forwarding requests to Apache:
```nginx
server {
listen 80;
location / {
proxy_pass http://apache;
}
}
```### 🌍 **Apache Configuration (`httpd.conf`)**
Apache is set up with PHP-FPM support:
```apacheSetHandler "proxy:fcgi://php-fpm:9000"
```
### 🔀 **Changing Ports**
To change the external ports used by the services, modify the `docker-compose.yml` file:
```yaml
nginx:
ports:
- "9090:80" # Change the external port (left side) to your preferred port
```
For example, changing `9090:80` to `8080:80` will make the service accessible at `http://localhost:8080` instead of `9090`.---
## 🛠 **Managing Containers**
### View Running Containers
```sh
docker ps
```### Stop the Stack
```sh
docker-compose down
```### Restart the Stack
```sh
docker-compose restart
```---
## 🐜 **License**
This project is licensed under the MIT License.---
## 🎯 **Contributions**
Pull requests and improvements are welcome! Feel free to open an issue for discussions. 🚀