Monday, June 9, 2025
Drupal JavaScripts to hide and show resources
Saturday, March 30, 2024
Cloudflare Settings for Marketing Websites
Cloudflare is a widely-used content delivery network (CDN) and cybersecurity company that offers a suite of performance and security solutions for websites. This documentation provides guidelines and best practices for configuring Cloudflare settings specifically tailored to marketing websites. By leveraging Cloudflare's features effectively, marketing teams can enhance website performance, reliability, and security while optimizing user experience.
Features and Configurations:
Content Delivery Network (CDN) Configuration:
Enable Cloudflare's CDN to accelerate website loading times by caching static content and serving it from Cloudflare's edge servers located worldwide.
Configure caching settings to cache static assets such as images, CSS, and JavaScript files, ensuring faster page load times for visitors.
SSL/TLS Encryption:
Enable SSL/TLS encryption to secure data transmission between visitors and the website's server.
Configure Cloudflare's SSL/TLS settings to enforce HTTPS protocol, ensuring all traffic is encrypted and secure.
Automatic Minification:
Utilize Cloudflare's automatic minification feature to reduce the size of CSS, JavaScript, and HTML files, optimizing website performance.
Enable minification settings for CSS, JavaScript, and HTML to remove unnecessary whitespace, comments, and formatting.
Image Optimization:
Enable Cloudflare's image optimization features to automatically optimize and resize images based on visitor device characteristics and screen sizes.
Configure image optimization settings to deliver optimized images in WebP or other formats for faster loading times and improved user experience.
Web Application Firewall (WAF):
Activate Cloudflare's WAF to protect the website against common web application attacks, such as SQL injection, cross-site scripting (XSS), and malicious bot traffic.
Customize WAF rulesets and security levels to balance security and usability, ensuring legitimate traffic is not blocked while mitigating security threats.
Bot Management:
Utilize Cloudflare's bot management features to identify and mitigate malicious bot traffic, such as scrapers, spammers, and DDoS attacks.
Configure bot management settings to allow legitimate search engine crawlers while blocking or challenging suspicious bot activity.
Implementation and Configuration:
Sign Up for Cloudflare:
Register for a Cloudflare account and add the marketing website to your Cloudflare dashboard.
DNS Configuration:
Update the website's DNS records to point to Cloudflare's nameservers for traffic routing through Cloudflare's network.
SSL/TLS Configuration:
Configure SSL/TLS settings in Cloudflare to enable encryption and select the appropriate SSL/TLS encryption mode (e.g., Full, Full (strict)).
Performance Optimization:
Enable caching, minification, and image optimization settings in Cloudflare to improve website performance.
Security Configuration:
Configure WAF, bot management, and other security settings in Cloudflare to protect the website from threats and attacks.
Testing and Monitoring:
Test the website's performance and security after configuring Cloudflare settings.
Monitor Cloudflare analytics and security logs to track website performance, traffic patterns, and security events.
Support and Resources:
For assistance with Cloudflare setup and configuration, refer to Cloudflare's official documentation, knowledge base, and support resources.
Engage with the Cloudflare community forums, user groups, and online communities to share experiences, seek advice, and troubleshoot issues.
Conclusion:
Configuring Cloudflare settings for marketing websites can significantly improve website performance, reliability, and security while enhancing the overall user experience. By following the guidelines and best practices outlined in this documentation, marketing teams can leverage Cloudflare's powerful features to optimize website delivery, protect against threats, and achieve their marketing objectives effectively.
Drupal module Security Kit
Drupal Security Kit (Seckit) is a module designed to enhance the security of Drupal websites by providing various security features and configurations. It aims to mitigate common security risks and vulnerabilities associated with Drupal websites, ensuring a more robust and secure online presence.
Features:
Content Security Policy (CSP) Integration:
Seckit integrates with Content Security Policy (CSP), allowing administrators to define and enforce policies to mitigate the risks of Cross-Site Scripting (XSS) attacks.
Administrators can configure CSP directives to specify trusted sources for various types of content, such as scripts, stylesheets, images, fonts, and more.
HTTP Strict Transport Security (HSTS) Support:
The module facilitates the implementation of HTTP Strict Transport Security (HSTS) headers, ensuring that web browsers enforce secure connections over HTTPS.
Administrators can configure HSTS parameters, including the max-age directive and the inclusion of subdomains.
X-Content-Type-Options Header Configuration:
Seckit enables administrators to set the X-Content-Type-Options header, which prevents MIME type sniffing attacks by instructing browsers to adhere strictly to declared content types.
X-Frame-Options Header Settings:
Administrators can configure the X-Frame-Options header to mitigate Clickjacking attacks by restricting the embedding of Drupal pages in frames on other websites.
X-XSS-Protection Header Control:
The module provides options to enable or disable the X-XSS-Protection header, which instructs browsers to activate built-in XSS protection features.
Referrer Policy Configuration:
Seckit allows administrators to define the referrer policy for outgoing requests, controlling the information sent in the HTTP Referer header to enhance privacy and security.
Installation and Configuration:
Installation:
Download and install the Drupal Security Kit module from the official Drupal.org repository or using Composer.
Configuration:
Once installed, navigate to the administration interface of your Drupal site.
Access the Configuration page and locate the "Security Kit" settings.
Configure each security feature according to your site's requirements and security policies.
Save the settings to apply the configured security measures to your Drupal website.
Usage:
After configuring the security settings within the module, Drupal Security Kit automatically applies the specified security headers and policies to incoming requests, bolstering the security posture of your Drupal website.
Compatibility:
Drupal Security Kit is compatible with Drupal 7 and Drupal 8/9, ensuring that websites built on different Drupal versions can benefit from its security features.
Support and Community:
For additional assistance, documentation, or community support, refer to the official Drupal Security Kit documentation on Drupal.org.
Engage with the Drupal community forums, issue queues, and user groups to share experiences, seek advice, and contribute to the improvement of the module.
Conclusion:
Drupal Security Kit (Seckit) offers a comprehensive suite of security features and configurations to fortify Drupal websites against common security threats and vulnerabilities. By leveraging this module, Drupal site administrators can enhance the security posture of their websites and safeguard sensitive data and user information effectively.
Wednesday, July 13, 2022
Blank page on NextJs project even every code was right - culprit was browser extension
I was working on some Nextjs projects where I have to show the Ads services content, so I created a file called ads-services.js under the pages folder of the NextJs project.
Then, I added the code something like the below:
Built it and run it in the browser and everything is blank, cannot see anything.
Found solution after 1/2 hour, either I have to disable the Adblocker extension used in the browser or need to change the ads-service.js file name to something live management-services.js
Rare headache which makes you bald.
Monday, May 23, 2022
Increase Persistent Disk in google cloud Virtual Machines through command lines
lsblk
sudo gorwpart /dev/sda 1
duso resize2fs /dev/sda1
df -h
Monday, December 27, 2021
API endpoints collections for the creation of Cryptocurrencies payment modules
https://docs.metamask.io/guide/getting-started.html#basic-considerations
https://infura.io/docs/eth2
https://marketinsg.zendesk.com/hc/en-us/articles/360045156711-Crypto-com-Pay
http://trufflesuite.com/index.html
https://rarible.com/create/erc-721
Tuesday, December 8, 2020
Fixed: Opencart installation error linux: warning: fopen(system/storage) failed to open stream: Permission denied
Warning: fopen(/var/www/html/webocreation.com/system/storage/session/....): failed to open stream: Permission denied in /var/www/html/webocreation.com/system/library/session/file.php on line 29 Warning: flock() expects parameter 1 to be resource, bool given in /var/www/html/webocreation/system/library/session/file.php on line 31 Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/webocreation/system/library/session/file.php on line 33 Warning: fflush() expects parameter 1 to be resource, bool given in /var/www/html/webocreation/system/library/session/file.php on line 35 Warning: flock() expects parameter 1 to be resource, bool given in /var/www/html/webocreation/system/library/session/file.php on line 37 Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/webocreation/system/library/session/file.php on line 39
These errors occurs because of the file permissions. In most of the forum, I found that they suggested to give full permission 0777 for the storage folder, this can be dangerous as per the security reason.I have added the opencart upload folders and files at /var/www/html/webocreationFollowing are the commands that I run:Change the ownership of the files and folders to the apache:apache sudo chown apache:apache -R .
Let's make the all files secure by giving permissions of 0644 find . -type f -exec chmod 0644 {} \; Likewise, let's make the directory accessible for the apache find . -type d -exec chmod 0755 {} \; Now, let give access to read all files for the httpd server sudo chcon -t httpd_sys_content_t . -R Allow write only to specific dirs sudo chcon -t httpd_sys_rw_content_t ./system/storage/cache -Rsudo chcon -t httpd_sys_rw_content_t ./system/storage/download -R
sudo chcon -t httpd_sys_rw_content_t ./system/storage/logs -R
sudo chcon -t httpd_sys_rw_content_t ./system/storage/modification -R
sudo chcon -t httpd_sys_rw_content_t ./system/storage/session -R
sudo chcon -t httpd_sys_rw_content_t ./system/storage/upload -R
sudo chcon -t httpd_sys_rw_content_t ./system/storage/vendor -R
Once these commands are run then you are ready to install.Then, open the browser and run the URL and you may get warning saying config.php file need to be writable, then for that run following two commands:sudo chcon -t httpd_sys_rw_content_t ./config.php -R
sudo chcon -t httpd_sys_rw_content_t ./admin/config.php -R
Friday, November 6, 2020
AWS ssh error: Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
I was ssh-ing to AWS EC2 instance and got the error Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
-----------------
Solution: The solution is just adding the right path, for the key pair that you downloaded. I was in the right folder and I gave the path by just adding "./"
ssh ec2-user@54.89.86.26 -i ./ec2-keypair.pem
-
Why do niggers wear wide brimmed hats? So birds won't shit on their lips. How do you stop black kids from jumping on your bed? Put Velcr...
-
php, tutorial, sql, video, css, user, login, cookies, lifeg0eson666, marcus, recck, youtube, online, science, A PHP Tutorial creating a User...
-
Building a CMS with PHP and MYSQL Pat 2 video, php tutorials video, php and mysql to make cms video





