Tag: apache

How to handle React routes in Apache and Nginx

Usually little setup of Apache and Nginx is needed so they can handle React routes properly without trying to treat them as real files or directories resulting in 404 Not Found in React. Here are the snippets of the React routes related settings for Apache and Nginx.

Continue reading

Implement Secure Headers in Apache and Nginx

HTTP security headers are very important part of website security as it protect you against different types of attacks including, XSS, SQL injection, clickjacking, etc. When you visit any website from your web browser, your browser requests it from the web server where the web site is hosted on. The web server then responds with …

Continue reading

Implementing Cache control headers in Nginx and Apache

Cache-Control are HTTP cache headers that holds instructions for caching for requests and responses. It is used to defines how a resource is cached, where it’s cached and its maximum age before expiring. When you visit a website, your browser will save images and website data in a store called the cache. When you revisit …

Continue reading

.htaccess: Option FollowSymLinks not allowed here

I moved from mod_php to fcgi style hosting and got the following in Apache error log when I tried to open one of my websites: [Tue Nov 08 08:34:08.357359 2022] [core:alert] [pid 19149] [client 95.158.43.63:14405] /home/domain.com/public_html/.htaccess: Option All not allowed here [Tue Nov 08 08:35:58.058962 2022] [core:alert] [pid 14190] [client 95.158.43.63:46366] /home/domain.com/public_html/.htaccess: Option FollowSymlinks not …

Continue reading

Implementing Security Headers in Azure App Service

Azure-App-Service

If you want to follow best security practices and implement Strict Transport Security and Secure Headers in your Azure App Service you will need to add Security Headers in web.config or .htaccess files in your web application’s root folder. Before you start remember that App Services run on a PaaS. This means that not everything …

Continue reading

No input file specified error

When going on some link you can get “No input file specified” error in your browser. To resolve this error, check that in the file .htaccess there was no line:

Copy

Continue reading

Letsencrypt Unable to find a virtual host listening on port 80

I installed Goautodial where access via HTTPS was configured “out-of-the-box” with self-signed certificate. HTTP access was configured through like default website in Apache without using VirtualHost directive. I tried to get a certificate from Letsencrypt and got the following error: Unable to find a virtual host listening on port 80 which is currently needed for …

Continue reading

Virtualmin: no Manage SSL certificate option

Virtualmin-SSL-certificate-option-enable

The problem is that you want to enable SSL certificate for virtual domain in Virtualmin but the Manage SSL certificate option is absent from the Server Configuration. By default Manage SSL option is absent and you need to enable it in Features. To do so go toEdit Virtual Server -> Enabled Features, and set “Apache …

Continue reading

How to remove mod_pagespeed from access.log

If you have mod_pagespeed installed on your webserver you may notice the following lines in access.log file:

Depending on the size of your website requests from mod_pagespeed can add flood your logfiles and their size will be significantly larger. Here is how you can exclude mod_pagespeed requests from access.log file

Continue reading

How not to log certain requests in Apache

By default Apache logs all requests. Sometimes you need to exclude logging of certain requests from Apache‘s access.log. For example some automated requests coming and flood your log distorting your statistics. This short guide shows how you use Apache’s SetEnvIf directive to prevent Apache from logging such requests.

Continue reading

Load more