js file larger than 1022 Bytes results in 404

Jeffreyb

Verified User
Joined
May 22, 2017
Messages
15
Hey all,

I'm running a pretty default DA configuration on a CentOS server with no problems in the past.
There are 2 user account with 3 subdomains configured as domain:
account1: hello.mysite.org
account2: live.mysite.org | dev.mysite.org

hello and live both work perfectly fine and consist of PHP & JS site.

"dev" I configured a little while ago, and contains a Laravel 5.6 site. The site itself runs fin on my laptop/desktop, but... not on the server.

To "Httpd.conf Customization for dev.mysite.org" I added:
Code:
|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html/public|
And the correct laravel "index.php" file is being called. However, the JS files return with a 404.

When I go directly to https://dev.mysite.org/js/app.js, it also returns a 404, even though the path is correct (checked multiple times).

- Permissions of the folders are correct (755)
- Owner of the files/folders are correct (account2:account2)
- Permissions of app.js are correct (644)

When I create a new file in the folder "..../public_html/public/js/" named "test.js" and add some text to it, I can call it by https://dev.mysite.org/js/test.js and it does return the typed text.
Permissions / owner are the same as with app.js


Now comes the fun part....
When I add 1023 characters to test.js using vim, the file also retuns 404. When test.js has 1022 characters, it return them fine (status 200).

So, clearly I have forgotten to configure something... but what?

Code:
Latest version of DirectAdmin: 1.55.0
Installed version of DirectAdmin: 1.55.0

Latest version of Let's Encrypt client: 1.1.19
Installed version of Let's Encrypt client: 1.1.19

Latest version of Apache: 2.4.38
Installed version of Apache: 2.4.38

Latest version of Nginx: 1.15.6
Installed version of Nginx: 1.15.6

Latest version of Pure-FTPD: 1.0.47
Installed version of Pure-FTPd: 1.0.47

Latest version of libpng: 1.6.36
Installed version of libpng: 1.6.36

Latest version of nghttp2: 1.36.0
Installed version of nghttp2: 1.36.0

Latest version of libjpeg: 9c
Installed version of libjpeg: 9c

Latest version of mod_ruid2: 0.9.8
Installed version of mod_ruid2: 0.9.8

Latest version of ICU4C: 58.2
Installed version of ICU4C: 58.2

Latest version of libsodium: 1.0.17
Installed version of libsodium: 1.0.17

Latest version of libxml2: 2.9.8
Installed version of libxml2: 2.9.8

Latest version of libxslt: 1.1.32
Installed version of libxslt: 1.1.32

Latest version of iconv: 1.15
Installed version of iconv: 1.15

Latest version of PCRE: 8.20
Installed version of PCRE: 8.20

Latest version of PCRE2: 10.32
Installed version of PCRE2: 10.32

Latest version of FreeType: 2.9.1
Installed version of FreeType: 2.9.1

Latest version of dovecot: 2.3.4.1
Installed version of dovecot: 2.3.4.1

Latest version of dovecot.conf: 0.3
Installed version of dovecot.conf: 0.3

Latest version of Exim: 4.92
Installed version of Exim: 4.92

Latest version of exim.conf: 4.5.12
Installed version of exim.conf: 4.5.12

Latest version of MariaDB: 10.2.22
Installed version of MariaDB: 10.2.22

Latest version of PHP 5.6: 5.6.40
Installed version of PHP 5.6: 5.6.40

Latest version of PHP 7.3: 7.3.2
Installed version of PHP 7.3: 7.3.2

Latest version of RoundCube webmail: 1.3.8
Installed version of RoundCube webmail: 1.3.8

Latest version of phpMyAdmin: 4.8.5-all-languages
Installed version of phpMyAdmin: 4.8.5-all-languages

Latest version of SquirrelMail: 1.4.23-20180516_0203
Installed version of SquirrelMail: 1.4.23-20180516_0203

Code:
Apache: 2.4.38
Nginx (reverse proxy): 1.15.6
mod_ruid2: 0.9.8
LibModSecurity: no
htscanner: no
Dovecot: 2.3.4.1
Dovecot configuration: yes
AWstats: no
Exim: 4.92
exim.conf update: yes, release 4.5
BlockCracking: no
Easy Spam Fighter: no
SpamAssassin: 3.4.2
SpamAssassin rule updates: daily
ClamAV: no
MariaDB: 10.2.22
MySQL backup: yes
MySQL backup directory: /usr/local/directadmin/custombuild/mysql_backups
MySQL compress backups: no
PHP (default): 7.3 as php-fpm
PHP (additional): 5.6 as php-fpm
phpMyAdmin: 4.8.5-all-languages
ProFTPD: no
Pure-FTPd: 1.0.47
RoundCube webmail: 1.3.8
Replace "php.ini" with './build all' and './build php_ini': no
Cron for notifications and (or) updates: yes
Cron frequency: weekly
Auto updates: yes
Run "clean" every time: yes
Run "clean_old_webapps" every time: yes
Run "clean_old_tarballs" every time: yes
Show texts in bold: yes
SquirrelMail: 1.4.23-20180516_0203
Zend Guard Loader: no
ionCube loader: no
Suhosin: no
 
I refreshed the page a couple of minutes ago, then checked the logs.

Code:
/var/log/nginx/error_log -> empty
/var/log/nginx/error_log-20190222 -> 1 record from 12 hours ago
/var/log/nginx/access_log -> last record is 11 hours old

/var/log/httpd/access_log -> nothing relevant
/var/log/httpd/error_log -> last record is 14 hours old
/var/log/httpd/domains/dev.example.org.error.log -> last record 14 hours old (ssl warn about www.dev. not existing, which is correct)

Unless im missing something, that all there is for logging....

In Firefox, I just noticed that favicon.ico also returns a 404
 
Was not aware that nginx/domains existed.

Code:
 *110341 openat() "/home/account1/domains/dev.example.org/private_html/js/app.js" failed (2: No such file or directory),

so basically, apache knows the right path, but nginx does not.... Guess i have to configure nginx to use the "public_html/public" as default root somewhere as well...


but, i still find it weird that small files were handled by apache, while files abot 1KB are handled by nginx?
 
Add both for nginx and apache into custom section at admin area:

Code:
|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html/public|
 
In the "Custom HTTPD Configurations" screen, I was not aware it is possible to press the "(nginx proxy)" link :|

Thank you for your help!
 
Back
Top