Not all Web content being served up from a site

jlpeifer

Verified User
Joined
Jun 6, 2006
Messages
97
I created a domain time.helpomatic.com

Inside of that domain's public_html I installed a git-hub project called Kimai2

Kimai2 created a directory structure that looks like this:
Code:
public_html/assets/
public_html/bin/
[B]public_html/public/[/B]
public_html/var/
public_html/vendor/

The public subdirectory is the public-facing directory, so I changed the DocumentRoot for the domain in DA...
Code:
|*if !SUB|
|?DOCROOT=/home/help/domains/time.helpomatic.com/public_html/public|
|*endif|

When I point my browser at http://time.helpomatic.com I can see that the script is kinda working. I can see textual content, but all the GUI content is missing.

In troubleshooting this I noticed that there are only selected files within that public directory (and associated sub-directories) that are accessible to the outside world. Here's a list of the files in the directory and what's accessible:
Code:
NO! -rw-rw-r--  1 help help  24K Jan  8 15:30 apple-touch-icon.png
YES drwxrwxr-x  4 help help    7 Jan  8 20:09 build
NO! ----------> ./build/ -rw-rw-r-- 1 help help 331K Jan  8 15:30 app.css
YES ----------> ./build/ -rw-rw-r-- 1 help help   15 Jan  9 06:22 test.txt
YES -rw-rw-r--  1 help help  22K Jan  9 05:46 check.php
NO! -rw-rw-r--  1 help help 5.6K Jan  8 15:30 favicon-32x32.png
NO! -rw-rw-r--  1 help help 1.2K Jan  8 15:30 favicon.ico
YES -rw-rw-r--  1 help help 1.3K Jan  8 15:30 index.php
YES -rw-rw-r--  1 help help  123 Jan  8 20:10 robots.txt
NO! -rw-rw-r--  1 help help  43K Jan  8 15:30 touch-icon-192x192.png

I don't think this is a permissions issue. I'm flummoxed. Can anyone provide insight as to why this is happening?
 
Did you double check all the install commands? You are right, those files (in the public folder) are the only files that needs access to the public world. I am not familiar with that project but looking at the /build folder: on GitHub there are multiple js and css files in that folder, but trying to access those files on your domain is resulting in an 404 error. So that's where you probably need to look.
 
Thanks for the input Erulezz. Yes, I double (even triple) checked the commands. No joy.

I'm working with the project developer to determine why this isn't working in a DA environment. I'll post back any conclusion / fix he recommends.
 
Hello,

If you have Apache behind NGINX, you need to update document root for both NGINX and Apache.

But I'd rather install application under /home/help/domains/time.helpomatic.com/ to have


Code:
time.helpomatic.com/assets/
time.helpomatic.com/bin/
time.helpomatic.com/public/
time.helpomatic.com/private_html -> ./public_html
time.helpomatic.com/public_html -> ./public
time.helpomatic.com/var/
time.helpomatic.com/vendor/

symbolic links.
 
If you have Apache behind NGINX...

I do! I was unaware that I'd have to update both NGINX and Apache. Is there documentation on how to do this in DA?

Instead of creating a subdomain I created a separate domain under the same user called "time.helpomatic.com" (per suggestion found here... https://forum.directadmin.com/showthread.php?t=57390)

This is what I have in the first field of the custom httpd.conf screen for that domain...

Code:
|*if !SUB|
|?DOCROOT=/home/help/domains/time.helpomatic.com/public_html/kimai2/public|
|*endif|
 
UPDATE: This issue is now resolved. I'll follow-up later with the fix (for future generations).
 
Code

Code:
[COLOR=#333333]|?DOCROOT=/home/help/domains/time.helpomatic.com/public_html/kimai2/public|[/COLOR]

should work both for nginx and apache. But you should add it with or without IF-ENDIF both into nginx and apache at admin level.
 
But you should add it with or without IF-ENDIF both into nginx and apache at admin level

I think I'm s-l-o-w-l-y catching on. I didn't realize until now that there are two links related to each domain found in: DA --> (Extra Features) Custom HTTPD Configurations for both Apache and Nginx ("nginx proxy").

So to be clear... I need to set the property in two places?

here-and-here.png
 

Attachments

  • here-and-here.png
    here-and-here.png
    16.6 KB · Views: 42
Back
Top