Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL stay on Missing entry in hosts file #8

Closed
stephane-r opened this issue Oct 26, 2016 · 15 comments
Closed

URL stay on Missing entry in hosts file #8

stephane-r opened this issue Oct 26, 2016 · 15 comments
Assignees
Labels
Milestone

Comments

@stephane-r
Copy link

stephane-r commented Oct 26, 2016

Hi Cytopia :)

I would like test your very nice devilbox, but when i edit my hosts file, URL stay with Missing entry in /etc/hosts. My hosts file :

127.0.0.1   localhost
127.0.1.1   ubuntu
::1             localhost

# The following lines are desirable for IPv6 capable hosts
#::1     ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters

127.0.0.1 www.project.lan.loc

But, if i go on www.project.lan.loc, vhost work fine. It's juste the URL status.

Do you have any idea ? Yet I have followed the instructions :)

Thank you !

@cytopia
Copy link
Owner

cytopia commented Oct 26, 2016

Hi @Leg3ndz can u post the exact error message from the intranet.
It should actually provide you the exact string that you need to put into /etc/hosts.

Also please attach your .env as well as an ls -l on your www directory, so I can see the names of the folders.

By your above entry, your foldername should be www.project.lan

@stephane-r
Copy link
Author

Thank for your response.

I did not necessarily error, juste the URL status (on vhost page) have Missing entry in /etc/hosts.

My .env :

###
###  ---------------------------------------------------
###  D E V I L B O X   R U N - T I M E   S E T T I N G S
###  ---------------------------------------------------
###
###  All the following settings are applied during
###  $ docker-compose up
###
###  No need to rebuild any dockers!
###


###
### Show all executed commands in each
### docker image during docker-compose up?
###
### 1: Yes
### 0: No
DEBUG_COMPOSE_ENTRYPOINT=0



################################################################################
###
### 1. Choose Images (Version)
###
################################################################################

###
### You can choose any combination of httpd, mysql or php.
### Each of them are fully compatible between one another.
###


###
### 1.1 Choose HTTP Server Image
###

#HTTPD_SERVER=apache-2.2
HTTPD_SERVER=apache-2.4
#HTTPD_SERVER=nginx-stable
#HTTPD_SERVER=nginx-mainline



###
### 1.2 Choose MySQL Server Image
###

#MYSQL_SERVER=mysql-5.5
MYSQL_SERVER=mysql-5.6
#MYSQL_SERVER=mysql-5.7
#MYSQL_SERVER=mariadb-5.5



###
### 1.3 Choose PHP Server Image
###

#PHP_SERVER=php-fpm-5.4
#PHP_SERVER=php-fpm-5.5
PHP_SERVER=php-fpm-5.6
#PHP_SERVER=php-fpm-7.0
#PHP_SERVER=php-fpm-7.1



###
### 1.4 Timezone for all dockers and service config files
###

TIMEZONE=Europe/Berlin






################################################################################
###
### 2. Host Settings (Your computer)
###
################################################################################


##
## Local filesystem path to www projects.
##
##
HOST_PATH_TO_WWW_DOCROOTS=~/data/www

##
## Local filesystem path to mysql datadir.
##
## This can be an existing mysql data directory or empty.
## If it already is a mysql data directory with content,
## it will be mounted into the docker and used.
##
## If this directory is empty, a new mysql database will be
## created.
##
HOST_PATH_TO_MYSQL_DATADIR=~/data/mysql56




################################################################################
###
### 3. HTTP Docker Settings
###
################################################################################

# - no options here




################################################################################
###
### 4. MySQL Docker Settings
###
################################################################################

##
## MySQL root user password
##
## If $HOST_PATH_TO_MYSQL_DATADIR already contains an existing
## mysql datadir, enter the password for the existing mysql database
##
## If $HOST_PATH_TO_MYSQL_DATADIR is empty, choose a new password that
## will be applied
##
MYSQL_ROOT_PASSWORD=


###
### Custom MySQL Runtime Settings
###

MYSQL_GENERAL_LOG=1



################################################################################
###
### 5. PHP-FPM Docker Settings
###
################################################################################


###
### Xdebug
###

# Enable/Disable Xdebug
PHP_XDEBUG_ENABLE=1

# Your local port (your computer host [not the docker])
# where your ide/editor is listening for xdebug connections.
PHP_XDEBUG_REMOTE_PORT=9000

# Your local IP address (your computer host [not the docker])
# where your ide/editor is listening for xdebug connections.
PHP_XDEBUG_REMOTE_HOST=172.20.10.2

I've restart my Ubuntu, and if i run docker-composer up, I do not have any project to detect in www/ folder.

Result command ls -l in ~/data/www

drwxr-xr-x 3 root root 4096 oct.  26 01:26 ./
drwxr-xr-x 4 root root 4096 oct.  26 01:22 ../
drwxr-xr-x 5 root root 4096 oct.  26 01:27 www.project.lan/

Thank again,

@cytopia
Copy link
Owner

cytopia commented Oct 26, 2016

Could you please attach a screenshot of the vhosts status page.

Also inside the devilbox folder, please check ./log/php-fpm-5.6/ and ./log/apache-2.4 for errors.

@cytopia
Copy link
Owner

cytopia commented Oct 26, 2016

Btw

Result command ls -l in ~/data/www

drwxr-xr-x 3 root root 4096 oct.  26 01:26 ./
drwxr-xr-x 4 root root 4096 oct.  26 01:22 ../
drwxr-xr-x 5 root root 4096 oct.  26 01:27 www.project.lan/

Is that correct, that it belongs to root in your ~ directory?

@stephane-r
Copy link
Author

stephane-r commented Oct 26, 2016

Yep, the config is good. (project.lan is replaced on my screenshot)

Edit : i need to run docker-compose rm -f for restart all container. So, here's what you asked :

sans-titre-1

I've access to my project vhost (babyswissmilk.lan.loc), just the status displayed is wrong on vhost page.

@cytopia
Copy link
Owner

cytopia commented Oct 26, 2016

Are you running the devilbox in VMWare and edited /etc/hosts on your host computer?

@stephane-r
Copy link
Author

I'm run Ubuntu with VMWare on Windows, and i edit Ubuntu hosts file.

@cytopia
Copy link
Owner

cytopia commented Oct 26, 2016

Are you browsing from your ubuntu VM or from windows?

@stephane-r
Copy link
Author

All action in on my Ubuntu started on VMWare.

@cytopia
Copy link
Owner

cytopia commented Oct 26, 2016

Ubuntu seems to use 127.0.1.1 instead of 127.0.0.1.
What does ifconfig on ubuntu show?

@cytopia
Copy link
Owner

cytopia commented Oct 26, 2016

Btw, regardless of this error, Is it actually possible to reach this site via the browser?

@cytopia
Copy link
Owner

cytopia commented Oct 26, 2016

Should work now.

I had to disable the /etc/hosts check for now.
It somehow works under OSX, but not on Linux.

I still have to figure out why and how to re-implement this properly.

If it works for you, please let me know, so this can get closed.

@cytopia cytopia added this to the 1.0 milestone Oct 26, 2016
@cytopia cytopia added the bug label Oct 26, 2016
@cytopia cytopia self-assigned this Oct 26, 2016
@stephane-r
Copy link
Author

Hi @cytopia

I confirm it work :)
Just, maybe add a message indicating that it must update hosts file ?

Thank you again for your support. Very nice devilbox :)

@cytopia
Copy link
Owner

cytopia commented Oct 27, 2016

Cool. Yes I will figure something out to make it as nice as before under Linux.

@cytopia cytopia closed this as completed Oct 27, 2016
@cytopia
Copy link
Owner

cytopia commented Oct 27, 2016

@cytopia cytopia mentioned this issue Nov 3, 2016
42 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants