.htaccess not working anymore after using "ngnix.conf proxy"

StephanS

Verified User
Joined
Jan 8, 2020
Messages
6
Location
NL, EU
Hi all,

I'm expering some waird problems with Apache (2.4.61) after using "ngnix.conf proxy" (ngnix 1.27.0).

I used in DirectAdmin (1.665) for a domain "Custom HTTPD Configurations" > "ngnix.conf proxy" and added the custom headers below, that works fantastic, however it broke .htaccess partly for every domain i added the headers.

add_header Cache-Control "max-age=86400";
add_header X-Content-Type-Options "nosniff";
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1";
add_header X-Download-Options "noopen";
add_header X-Permitted-Cross-Domain-Policies "master-only";
add_header X-DNS-Prefetch-Control "on";
add_header Referrer-Policy "no-referrer";
add_header Strict-Transport-Security "max-age=31536000";
add_header Content-Security-Policy "block-all-mixed-content";
add_header Permissions-Policy 'geolocation=*, midi=(), sync-xhr=(self [https://|DOMAIN|]https://|DOMAIN| [https://www.|DOMAIN|]https://www.|DOMAIN|), microphone=(), camera=(), magnetometer=(), gyroscope=(), payment=(), fullscreen=(self [https://|DOMAIN|]https://|DOMAIN| [https://www.|DOMAIN|]https://www.|DOMAIN| )';

I removed the headers above in "ngnix.conf proxy". but .htaccess (apache) is remaining broken only for the domains i used the proxy.

I removed the domain and its files from the server and created it again but .htaccess is still not working. htaccess is being read, it returns errors if i make some on purpose but mod_rewrite and mod_headers are not being executed.

I restarted the services ngnix, httpd even rebooted the whole server, not helping.

Some new versions popped up and i upgraded DA and Apache today, still same problems.

The domains i did not touche with the proxy are working fine, everything is being read in .htaccess and im using the same headers for apache see below:
<IfModule mod_headers.c>
Header set Content-Security-Policy "upgrade-insecure-requests"
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header set X-Xss-Protection "1; mode=block"
Header set X-Frame-Options "SAMEORIGIN"
Header set X-Content-Type-Options "nosniff"
Header set Referrer-Policy "strict-origin-when-cross-origin"
Header set Permissions-Policy "geolocation=self"
</IfModule>

httpd error log returns some errors : [proxy_fcgi:error] Got error 'Primary script unknown'

I have no clue how to fix this, you guy's are also experiancing this? I hope someone can help me out.
 
Back
Top