Results 1 to 9 of 9

Thread: Not all Web content being served up from a site

  1. #1
    Join Date
    Jun 2006
    Posts
    83

    Not all Web content being served up from a site

    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/
    public_html/public/
    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?

  2. #2
    Join Date
    Sep 2015
    Location
    Arnhem, NL
    Posts
    427
    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.

  3. #3
    Join Date
    Jun 2006
    Posts
    83
    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.

  4. #4
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,952
    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.
    Regards, Alex G.

    - You can hire me on www.poralix.com to work on your server
    - Follow and like @Poralix on Facebook

  5. #5
    Join Date
    Jun 2006
    Posts
    83
    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|

  6. #6
    Join Date
    Jun 2006
    Posts
    83
    UPDATE: This issue is now resolved. I'll follow-up later with the fix (for future generations).

  7. #7
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,952
    Code

    Code:
    |?DOCROOT=/home/help/domains/time.helpomatic.com/public_html/kimai2/public|
    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.
    Regards, Alex G.

    - You can hire me on www.poralix.com to work on your server
    - Follow and like @Poralix on Facebook

  8. #8
    Join Date
    Jun 2006
    Posts
    83
    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
    Attached Images Attached Images

  9. #9
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,952
    Yes, you need to set the property in two places
    Regards, Alex G.

    - You can hire me on www.poralix.com to work on your server
    - Follow and like @Poralix on Facebook

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •