• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Downloading files with .db extension - error 403 - forbidden

VojinP

Basic Pleskian
Since some time, my server denies downloading .db extensions, which is crucial for my app to download it directly. When I change filename to .txt extension, works just normally, but when it is .db extension won't work. Any idea why? I think I don't have mod_security or similar stuff on the server. I have tried from several folders in website, same behaviour - denied.
 
Hmm... I have turned of Proxy mode in Apache Nginx settings and now it is working. But that is too bad.....
 
That is nice, but I do not have WordPress site.
Hello.

If disabling Proxy Mode helps - it looks like a problem on Apache's side. Can you check - does the domain has any specific configuration for Apache on "Apache & Nginx settings" page? Also, is there any .htaccess file in domain folders?
 
Hello.

If disabling Proxy Mode helps - it looks like a problem on Apache's side. Can you check - does the domain has any specific configuration for Apache on "Apache & Nginx settings" page? Also, is there any .htaccess file in domain folders?
There is a classic wordpresses htaccess file, I'm using it for my websites. In nginx configuration there was nginx version of wordpresses htaccess...
 
There is a classic wordpresses htaccess file, I'm using it for my websites. In nginx configuration there was nginx version of wordpresses htaccess...
NginX configuration:

Code:
if (!-e $request_filename) {
    set $test P;
}
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon|internal-nginx-static-location)) {
    set $test "${test}C";
}
if ($test = PC) {
    rewrite ^/(.*)$ /index.php?$1;
}

.htaccess:
Apache config:
RewriteEngine On
RewriteBase /

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
 
Hello.

If disabling Proxy Mode helps - it looks like a problem on Apache's side. Can you check - does the domain has any specific configuration for Apache on "Apache & Nginx settings" page? Also, is there any .htaccess file in domain folders?
Howver I do not think there is an issue both with nginx configuration or htaccess. For example file.db and file.txt both exists in same folder, file.txt is accessable, file.db is not.
 
Then it has to be a problem with nginx configuration. Did you also check the includes in e.g. /etc/nginx/modules.conf.d?
BTW, which logfile did the errors end up in?
I see no errors in a log, like it never happened, and there is nothing suspicious in nginx configuration files.
 
Back
Top