Open Suborno22 opened 7 months ago
I've had similar problems with Nginx, but the reason was because I used several versions of PHP, which is not your case. Are you having the same problem using Apache on Devilbox?
And did you use the docker-compose rm -f
command after stopping the containers? Because I didn't see this command in your pastebin file.
I don't remember if I ran the code after deleting or before deleting the folder. Also, I am very much new to the docker so I don't recall if I have even done so but after I deleted the folder, I have again cloned it from github and again tried running the script that I have made and yet I faced the same error.
I am sharing my devilbox start and stop script.
start-devilbox.sh:
#!/bin/bash
# update and upgrade system
sudo apt update && sudo apt upgrade -y
# Navigate to home directory
cd ~
# Navigate to devilbox directory
cd devilbox/
# Stop MySQL service
sudo service mysql stop
# Stop systemd-resolved service
sudo systemctl stop systemd-resolved
# Start Devilbox using Docker Compose
docker-compose up -d
And this is my stop script
stop-devilbox.sh
#!/bin/bash
# Navigate to home directory
cd ~
# Navigate to devilbox directory
cd devilbox/
# Stop Devilbox using Docker Compose
docker-compose down
# Start systemd-resolved service
sudo systemctl start systemd-resolved
# Stop MySQL service
sudo service mysql start
# update and upgrade system
sudo apt update && sudo apt upgrade -y
UPDATE: I have ran your command (I havent start the devilbox yet )and all I am getting is :No Stopped Containers.
Try change the server in the .env
file from nginx to apache. And make sure TLD_SUFFIX
is set to local
, since you cloned it again:
TLD_SUFFIX=local
# ...
HTTPD_SERVER=apache-2.4
#HTTPD_SERVER=nginx-stable
Save the .env
file.
Create your directory hi
inside devilbox/data/www
.
Put your project and create the htdocs
symlink inside hi
.
Go back to the devilbox
directory and use the commands below in sequence:
docker-compose stop
docker-compose rm -f
docker-compose up -d
I did as you said, including stopping apache2 server and MySQL server from the system by sudo systemctl stop apache2 and sudo systemctl stop mysql, also i have a symlink of htdocs inside hi folder, yet, I am facing the same issue. For further ref, here is my etc/hosts file now.
127.0.0.1 hi.local
127.0.0.1 Foo.local
127.0.0.1 localhost
127.0.1.1 ubuntu-pc
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Also I have created a symlink of htdocs inside hi folder which might shows using -l in ls command:
ubuntu@ubuntu-pc:~/devilbox$ ls data/www/
Foo hi
ubuntu@ubuntu-pc:~/devilbox$ ls -l data/www/hi
total 4
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr 6 05:37 htdocs
yet the issue still remains.
Have you already looked into this bug?
(Optional) Error message
No Host DNS record found. Add the following to /etc/hosts: 127.0.0.1 hi.local
What went wrong?
I have inserted
127.0.0.1 hi.local
inside /etc/hosts/ by sudo nano in terminal, but It still shows up that no DNS record foundExpected behaviour
I expect that it should show up the folder name.
How can we reproduce the bug?
I had two or three projects and I deleted them. After that, i made changes in /etc/hosts by removing the directories name. Then I saw that when i created that folder, and after editing it in /etc/hosts/, it's not getting updated.
Host Operating System
Linux
Host Platform (amd64, arm64, other)
amd64
(Linux only) Is SELinux enabled?
I don't know
Docker version
Docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1
Docker Compose version
docker-compose version 1.29.2, build unknown
Devilbox version
Latest
Have you removed stopped containers before starting?
Yes
Have you pulled latest Docker images before starting?
No
Devilbox start command
I have wrote a script file. : https://pastebin.com/mmLqsZpE
Config: .env file
Config: docker-compose.override.yml
No response
Config: ./check-config.sh
Log: docker-compose logs
(Optional) Additional information
No response