https://github.com/akeb/localwebserver
https://github.com/akeb/localwebserver
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/akeb/localwebserver
- Owner: AKEB
- Created: 2023-08-17T18:30:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-18T09:51:59.000Z (7 months ago)
- Last Synced: 2024-12-18T10:38:43.117Z (7 months ago)
- Language: Shell
- Size: 84 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Local Web Server For Developers
It is a simple Nginx proxy manager + php-fpm + mysql + phpmyadmin web server
## Example Project
### Prepare example project
```bash
cd ./example/docker/echo "127.0.0.1 my.example.ru" >> /etc/hosts # Add domain IP address into /etc/hosts file
echo "127.0.0.1 my.example.com" >> /etc/hosts # Add domain IP address into /etc/hosts fileecho "NGINX_PORT=8080" > .env # Add port settings into .env file
```### Run example project
```bash
cd ./example/docker/docker-compose up -d
curl -k "http://my.example.ru:8080/"
```## Run web server
```bash
docker-compose up -d
```Then open [http://localhost:81/](http://localhost:81/)
```bash
Email: [email protected]
Password: change_me
```### Add new proxy host
```bash
Domain Name: my.example.ru my.example.com
Scheme: http
Forward Hostname / IP: host.docker.internal
Forward Port: 8080
```## SSL Certificate
Please read the file [README.md](./ssl/README.md) in the ssl folder.
If an SSL certificate is required, under *SSL Certificates* section select *Add SSL Certificate* and add a custom certificate.
```bash
Name: my-example-ru
Certificate Key: ./ssl/example/example.key
Certificate: ./ssl/example/example.crt
Intermediate Certificate: ./ssl/example/root_ca.pem
```* Go to *Proxy Hosts* section and edit my.example.ru.
* Go to SSL section and select your custom certificate
* After save and run example project, you can check it [https://my.example.ru/](https://my.example.ru/) or in terminal ```curl "https://my.example.ru/"```## Reconfigure php-fpm or nginx
Make changes into each folder and then run *./build_docker_php_fpm.sh* file