Hi, Can someone share nginx directives to be added to Nginx Directive Options Tab in ISPConfig? Things like: Change document root from web to public folder inside web Prevent directory listing for some directories Any other performance settings Regards
Code: ##subroot public ## directory listing should be off by default on nginx servers. so you shouldn't need to do anything to prevent it.. you can enable it on a directory with: Code: location /somedir { autoindex on; } obviously, if it is on, you can disable it by changing it to 'autoindex off' Code: add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header X-Xss-Protection "1; mode=block" always; add_header Referrer-Policy 'same-origin'; add_header Content-Security-Policy "default-src 'self'; base-uri 'self'; frame-src 'self'; frame-ancestors 'self'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; form-action 'self';" always; using 'unsafe-inline' isn't recommended.. but unless you're specifying a hash, or random nonce (for every inline script/css on every page request) then wordpress sites will freak out if you provide any stricter CSP settings. and depending on the design/content of your site, you might need to change some of the other headers too.