Files not found on remote target due to mixing project server model and docker target server type

Hi Everyone,

I am getting this error message while trying to deploy a simple website to a remote docker machine using the Digital ocean integration.

image

I have followed all the steps in this video tutorial (https://www.youtube.com/watch?v=QDszFHnQ0ic) and I am getting all the connections successful, but when I try to visit the website at the IP it is hosted on, I get the error message.

Any idea what the issue is here?

Try checking the logs for the deployment. On the right side of the deploy icons in the publishing toolbar below there is also an option to displays logs. So click on it and see if there were some errors on the deploy

Hey @George,

Thank you for checking this out.

This is the response I am getting from the logs of the deployment.

    web_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive glo
bally to suppress this message
web_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive glo
bally to suppress this message
web_1  | [Sun Sep 13 14:56:52.842784 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.9 configured -- resuming normal operat
ions
web_1  | [Sun Sep 13 14:56:52.843183 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
web_1  | [Sun Sep 13 14:56:59.445138 2020] [autoindex:error] [pid 18] [client 109.96.41.68:61689] AH01276: Cannot serve directory /var/www/html/: No m
atching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 109.96.41.68 - - [13/Sep/2020:14:56:59 +0000] "GET / HTTP/1.1" 403 506 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT
ML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | [Sun Sep 13 14:57:00.305170 2020] [autoindex:error] [pid 17] [client 109.96.41.68:61692] AH01276: Cannot serve directory /var/www/html/: No m
atching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 109.96.41.68 - - [13/Sep/2020:14:57:00 +0000] "GET / HTTP/1.1" 403 506 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT
ML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | [Sun Sep 13 14:57:00.968869 2020] [autoindex:error] [pid 17] [client 109.96.41.68:61692] AH01276: Cannot serve directory /var/www/html/: No m
atching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 109.96.41.68 - - [13/Sep/2020:14:57:00 +0000] "GET / HTTP/1.1" 403 505 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT
ML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"

I have no idea what this means, since I am not an expert when it comes to devops and hosting, do you have any idea with what is happening?

It means that docker and the web server in it can’t find your web site folder in your project.

Make sure in the docker desktop settings, you have shared your C: drive with docker to allow access. Maybe you have denied that access per accident when it was asked.

Docker desktop settings are available when you right click on the docker icon in your tray settings.

Hey @George

I added the folder of the project as you suggested to docker settings => File sharing

I restarted Docker and tried to deploy it again, however still I am getting the same result.

I am not sure about the problem, because I have another wappler project that is also deployed using Docker/Digital ocean and that one worked fine from the first time I set it up, however with this project the webserver and Docker cant find the web site folder, which is strange because I didn’t change any settings in Docker.

Appreciate your support.

Ah wait a moment, seems I misread the initial error, you docker seems all fine but you just don’t have a default page?

Like index.html or index.php in your website root.

So that is what the error is about.

Oh ok, I get it now.

But actually I have index.html file. Here is a screenshot of the project folder files

And I am working on NodeJS so I have index.ejs and it is still not working. I have tried going to site.com/index.html or site.com/index.ejs but I am getting “Not found”

Sorry to bother you, I think this is a very simple issue that I am missing somehow.

Hmmm is your routing setup well? To point the default / to your index?

Does your site works well on your local development target?

I think routing is setup well. Currently / is pointing to index.

image

there is no issue with the site on local development target.

I have tried deleting the previous docker machine which I had running on digital ocean and doing the installation process again, but still I am getting the same error.

db_1   | 2020-09-13 16:56:37+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
db_1   | 2020-09-13 16:56:37+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1   | 2020-09-13 16:56:37+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
db_1   | 2020-09-13 16:56:37+00:00 [Note] [Entrypoint]: Initializing database files
db_1   | 2020-09-13T16:56:37.934675Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.21) initializing of server in progress as process 42

db_1   | 2020-09-13T16:56:37.958498Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
db_1   | 2020-09-13T16:56:38.897989Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
db_1   | 2020-09-13T16:56:40.428120Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off
 the --initialize-insecure option.
db_1   | 2020-09-13 16:56:42+00:00 [Note] [Entrypoint]: Database files initialized
db_1   | 2020-09-13 16:56:42+00:00 [Note] [Entrypoint]: Starting temporary server
db_1   | 2020-09-13T16:56:43.337717Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.21) starting as process 89
db_1   | 2020-09-13T16:56:43.374524Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
db_1   | 2020-09-13T16:56:43.716695Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
db_1   | 2020-09-13T16:56:43.917950Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
db_1   | 2020-09-13T16:56:44.141322Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
db_1   | 2020-09-13T16:56:44.141976Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now suppo
rted for this channel.
db_1   | 2020-09-13T16:56:44.144486Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is
 accessible to all OS users. Consider choosing a different directory.
db_1   | 2020-09-13T16:56:44.184343Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.21'  socket: '/var/run/mys
qld/mysqld.sock'  port: 0  MySQL Community Server - GPL.
db_1   | 2020-09-13 16:56:44+00:00 [Note] [Entrypoint]: Temporary server started.
db_1   | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
db_1   | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
db_1   | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
db_1   | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
db_1   | 2020-09-13 16:56:47+00:00 [Note] [Entrypoint]: Creating database sanodoc
db_1   | 2020-09-13 16:56:47+00:00 [Note] [Entrypoint]: Creating user db_user
db_1   | 2020-09-13 16:56:47+00:00 [Note] [Entrypoint]: Giving user db_user access to schema sanodoc
db_1   |
db_1   | 2020-09-13 16:56:47+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/cars.sql
db_1   |
db_1   |
db_1   | 2020-09-13 16:56:47+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/countries.sql
db_1   |
db_1   |
db_1   | 2020-09-13 16:56:47+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/images.sql
db_1   |
db_1   |
db_1   | 2020-09-13 16:56:47+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/users.sql
db_1   |
db_1   |
db_1   | 2020-09-13 16:56:47+00:00 [Note] [Entrypoint]: Stopping temporary server
db_1   | 2020-09-13T16:56:47.539025Z 18 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.21).
db_1   | 2020-09-13T16:56:49.512935Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL
.
db_1   | 2020-09-13 16:56:49+00:00 [Note] [Entrypoint]: Temporary server stopped
db_1   |
db_1   | 2020-09-13 16:56:49+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
db_1   |
db_1   | 2020-09-13T16:56:49.909779Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.21) starting as process 1
db_1   | 2020-09-13T16:56:49.920876Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
db_1   | 2020-09-13T16:56:50.188809Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
db_1   | 2020-09-13T16:56:50.346215Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/
mysqld/mysqlx.sock
db_1   | 2020-09-13T16:56:50.456490Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
db_1   | 2020-09-13T16:56:50.457135Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now suppo
rted for this channel.
db_1   | 2020-09-13T16:56:50.460343Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is
 accessible to all OS users. Consider choosing a different directory.
db_1   | 2020-09-13T16:56:50.501516Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.21'  socket: '/var/run/mys
qld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
db_1   | mbind: Operation not permitted
db_1   | mbind: Operation not permitted
db_1   | mbind: Operation not permitted
db_1   | mbind: Operation not permitted
web_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive glo
bally to suppress this message
web_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive glo
bally to suppress this message
web_1  | [Sun Sep 13 16:56:38.875862 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.9 configured -- resuming normal operat
ions
web_1  | [Sun Sep 13 16:56:38.878918 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
web_1  | [Sun Sep 13 16:56:43.193660 2020] [autoindex:error] [pid 17] [client 109.96.41.68:64627] AH01276: Cannot serve directory /var/www/html/: No m
atching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 109.96.41.68 - - [13/Sep/2020:16:56:43 +0000] "GET / HTTP/1.1" 403 506 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT
ML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | 109.96.41.68 - - [13/Sep/2020:16:56:43 +0000] "GET /favicon.ico HTTP/1.1" 404 505 "http://164.90.224.178/" "Mozilla/5.0 (Windows NT 10.0; Win
64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | [Sun Sep 13 16:56:44.953313 2020] [autoindex:error] [pid 17] [client 109.96.41.68:64627] AH01276: Cannot serve directory /var/www/html/: No m
atching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 109.96.41.68 - - [13/Sep/2020:16:56:44 +0000] "GET / HTTP/1.1" 403 505 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT
ML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | [Sun Sep 13 16:56:45.701223 2020] [autoindex:error] [pid 17] [client 109.96.41.68:64627] AH01276: Cannot serve directory /var/www/html/: No m
atching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 109.96.41.68 - - [13/Sep/2020:16:56:45 +0000] "GET / HTTP/1.1" 403 505 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT
ML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | [Sun Sep 13 16:56:56.733649 2020] [autoindex:error] [pid 19] [client 109.96.41.68:64663] AH01276: Cannot serve directory /var/www/html/: No m
atching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 109.96.41.68 - - [13/Sep/2020:16:56:56 +0000] "GET / HTTP/1.1" 403 506 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT
ML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | [Sun Sep 13 17:00:06.414135 2020] [autoindex:error] [pid 20] [client 167.248.133.49:41224] AH01276: Cannot serve directory /var/www/html/: No
 matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 167.248.133.49 - - [13/Sep/2020:17:00:06 +0000] "GET / HTTP/1.1" 403 450 "-" "-"
web_1  | [Sun Sep 13 17:00:06.611725 2020] [autoindex:error] [pid 21] [client 167.248.133.49:54530] AH01276: Cannot serve directory /var/www/html/: No
 matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 167.248.133.49 - - [13/Sep/2020:17:00:06 +0000] "GET / HTTP/1.1" 403 450 "-" "Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.cens
ys.io/)"
web_1  | [Sun Sep 13 17:01:13.165302 2020] [autoindex:error] [pid 18] [client 78.187.192.67:60543] AH01276: Cannot serve directory /var/www/html/: No
matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 78.187.192.67 - - [13/Sep/2020:17:01:13 +0000] "GET / HTTP/1.1" 403 450 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, l
ike Gecko) Chrome/52.0.2743.116 Safari/537.36"
web_1  | [Sun Sep 13 17:15:03.155688 2020] [autoindex:error] [pid 17] [client 192.241.227.78:54106] AH01276: Cannot serve directory /var/www/html/: No
 matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 192.241.227.78 - - [13/Sep/2020:17:15:03 +0000] "GET / HTTP/1.1" 403 450 "-" "Mozilla/5.0 zgrab/0.x"
web_1  | 45.148.10.28 - - [13/Sep/2020:18:29:22 +0000] "POST /boaform/admin/formLogin HTTP/1.1" 404 518 "http://164.90.224.178:80/admin/login.asp" "Mo
zilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0"
web_1  | [Sun Sep 13 18:33:44.552400 2020] [autoindex:error] [pid 16] [client 88.238.85.177:57424] AH01276: Cannot serve directory /var/www/html/: No
matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 88.238.85.177 - - [13/Sep/2020:18:33:44 +0000] "GET / HTTP/1.1" 403 450 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.
7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7"
web_1  | 109.96.41.68 - - [13/Sep/2020:18:57:03 +0000] "GET /index.html HTTP/1.1" 404 505 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/5
37.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | 109.96.41.68 - - [13/Sep/2020:18:57:20 +0000] "GET /index.js HTTP/1.1" 200 354 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537
.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | 109.96.41.68 - - [13/Sep/2020:18:57:30 +0000] "GET /index.ejs HTTP/1.1" 404 504 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/53
7.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | 109.96.41.68 - - [13/Sep/2020:18:58:07 +0000] "GET /index HTTP/1.1" 404 500 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | 109.96.41.68 - - [13/Sep/2020:19:05:49 +0000] "GET /index.html HTTP/1.1" 404 505 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/5
37.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | [Sun Sep 13 19:06:04.829627 2020] [autoindex:error] [pid 20] [client 109.96.41.68:52797] AH01276: Cannot serve directory /var/www/html/: No m
atching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 109.96.41.68 - - [13/Sep/2020:19:06:04 +0000] "GET / HTTP/1.1" 403 506 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT
ML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | [Sun Sep 13 19:06:41.000159 2020] [autoindex:error] [pid 16] [client 109.96.41.68:52911] AH01276: Cannot serve directory /var/www/html/: No m
atching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
web_1  | 109.96.41.68 - - [13/Sep/2020:19:06:41 +0000] "GET / HTTP/1.1" 403 506 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT
ML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | 109.96.41.68 - - [13/Sep/2020:19:15:06 +0000] "GET /index HTTP/1.1" 404 500 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
web_1  | 45.148.10.28 - - [13/Sep/2020:19:47:49 +0000] "POST /boaform/admin/formLogin HTTP/1.1" 404 518 "http://164.90.224.178:80/admin/login.asp" "Mo
zilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0"

Currently I am working on version 3.2.0

I just tested the connection with Docker for the same machine installation with the demo portfolio site and it worked instantly without any errors.

I also tried to add a new page to my website and it worked on localhost however it was still not working with Docker.

I have no idea why its not working especially since I have another NodeJS project that is much more complicated than this 1 page website, and over there everything is working fine and smooth with Docker.

@Teodor, @nshkrsh, @Hyperbytes Any suggestions on what the issue could be here with hosting, I simply don’t know what to do anymore?

sorry, can’t help here - we have very little experience with docker & digital ocean!

maybe cloning the droplet of your other working project and then publishing this new one to that cloned droplet might work!

1 Like

Maybe a obvious question but did you change the active target to your live server and hit the deploy icon?

And what was the output if you expand the panel below?

Yes I tried doing that. I am hitting deploy on the active target and I am getting the green color, and the message All Services Launched! probably indicating that it should work, but it actually doesn’t.

Can you try reproducing this, maybe its a bug, here are the steps to reproduce:

  1. Create a new wappler project on NodeJS server model
  2. Add a new Remote target with Docker Engine and select digital ocean for Docker remote section
  3. After target is created and set up, select it and try to deploy your project to the digital ocean server
  4. After deploy, check on the browser if website is working, for me its not working!!

Wappler version: 3.2.0
I am using Windows 10

Initially I thought this problem was something to do with my project, however when I tried it on a php project to test if Docker installation is fine, it worked, but when I try it on a brand new NodeJS project it doesn’t work.
Also note that I have another project running on nodeJS already and I had the Docker installation there done a month ago, and this one is working fine when I want to push updates to the Digital ocean server.

But have you chosen in the live target options that the web server is a NodeJS server??

Because it is trying to start Apache php server while you are saying you want NodeJS …

I actually remember trying to change the Apache server, however I didn’t find it in the beginning and then thought it magically changes and so I forgot about it. Obviously this was the issue.

1 Like

We will add more checks to the options so such impossible mixtures doesn’t happen.

1 Like

Thank you and I appreciate all the amazing things you guys are working on and building!!!

1 Like