Author Topic: 404 Not Found on any /home/user/public_html/uploads Directory  (Read 1530 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
404 Not Found on any /home/user/public_html/uploads Directory
« on: January 13, 2018, 11:05:17 PM »
Hi there,

I have a well running CWP on CentOS7, with Apacahe & Nginx Reverse Proxy, without Mod Security.

All websites of all domains run correctly but whenever I create a folder named "uploads" inside any ./public_html/ folder I get 404 Not Found for anything in that folder. Not even Directory Listing works.

If I rename "uploads" to "upload" everything works perfectly.

When I rename "upload" back to "uploads" if gives 404 Not Found immediately.

There are no errors in /usr/local/apache/logs/error_log or in /var/log/nginx/error.domain_name.log

Has anyone seen this type of error before?

Any advice on where to look or resolve it?

Thanks,

Ryan

Offline
*
Re: 404 Not Found on any /home/user/public_html/uploads Directory
« Reply #1 on: January 22, 2018, 10:53:12 AM »
tray to rebuild Vhosts

Offline
***
Re: 404 Not Found on any /home/user/public_html/uploads Directory
« Reply #2 on: February 07, 2018, 07:49:44 AM »
check .htaccess file in your public_html folder, it might cause the 404 (maybe there is a rewrite rule)

Offline
*
Re: 404 Not Found on any /home/user/public_html/uploads Directory
« Reply #3 on: February 13, 2018, 07:44:31 PM »
It's definitely not something in vhosts or in the .htaccess

Apache Vhost Template:

# vhost_start DOMAIN_REPLACE
<VirtualHost IP_REPLACE:PORT_REPLACE>
   ServerName DOMAIN_REPLACE
   ServerAlias www.DOMAIN_REPLACE
   ServerAdmin webmaster@DOMAIN_REPLACE
   DocumentRoot PATH_REPLACE
   UseCanonicalName Off
   ScriptAlias /cgi-bin/ PATH_REPLACE/cgi-bin/

   # Custom settings are loaded below this line (if any exist)
   # Include "/usr/local/apache/conf/userdata/USER_REPLACE/DOMAIN_REPLACE/*.conf

   <IfModule mod_userdir.c>
      UserDir disabled
      UserDir enabled USER_REPLACE
   </IfModule>

   <IfModule mod_suexec.c>
      SuexecUserGroup USER_REPLACE USER_REPLACE
   </IfModule>

   <IfModule mod_suphp.c>
      suPHP_UserGroup USER_REPLACE USER_REPLACE
      suPHP_ConfigPath /home/USER_REPLACE
   </IfModule>

   <Directory "PATH_REPLACE">
      AllowOverride All
   </Directory>


# Apache Virtual host file starts here

server {
listen YOURSERVERIP:NGINXPORT;
access_log /var/log/nginx/access.YOURDOMAIN.log;
error_log /var/log/nginx/error.YOURDOMAIN.log;
server_name YOURDOMAIN www.YOURDOMAIN;
root DOCROOT;

location / {
location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|woff|ttf|svg|eot|sh)\$ {
expires 7d; #Comment this out if you are using the apache backend cache-control/expires headers.
try_files \$uri \@backend;
}
error_page 405 = \@backend;
error_page 500 = \@custom;
add_header X-Cache "HIT from Backend";
proxy_pass http://YOURSERVERIP:PROXYPORT;
include proxy.inc;
}
location \@backend {
internal;
proxy_pass http://YOURSERVERIP:PROXYPORT;
include proxy.inc;
}
location \@custom {
internal;
proxy_pass http://YOURSERVERIP:PROXYPORT;
include proxy.inc;
}
location ~ .*\.(php|jsp|cgi|pl|py)?\$ {
proxy_pass http://YOURSERVERIP:PROXYPORT;
include proxy.inc;
}
location ~ /\.ht {
deny all;
}
}

# Virtual host file ends here


# Nginx Virtual host file starts here:

Every single domain on the server blocks Apache/Nginx access to a folder named "uploads"