How to install Apache, PHP 7.3 and MySQL on CentOS 7.6

How to install Apache, PHP 7.3 and MySQL on CentOS 7.6 I will add the EPEL repo here to install latest phpMyAdmin as follows: rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY* yum -y install epel-release Installing MySQL / MariaDB MariaDB is a MySQL fork of the original MySQL developer Monty Widenius. MariaDB is compatible with MySQL and I’ve chosen […]

Read more
Apache-based Web virtual host under Linux

Web virtual host refers to running multiple web sites in the same server, each of which does not actually occupy the entire server. Therefore, it is called a “virtual” web host, and the virtual web hosting service can make full use of the server. Hardware resources. Using httpd makes it easy to set up a […]

Read more
apache redirect

Create your own short links with the mod_rewrite feature of the Apache HTTP server. A long time ago, people started sharing links on Twitter. The 140-character limit means that the URL may consume most (or all) of a tweet, so people use URLs to shorten the service. In the end, Twitter added a built-in URL […]

Read more
Hotlink Protection

Enable Hotlink Protection on Apache If your WordPress site is running on Apache, all you need to do is open the .htaccess file in your site’s root directory (or create it) and add the following: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com […]

Read more
Implementing Content Security Policy in Apache

Header unset Content-Security-Policy Header add Content-Security-Policy “default-src ‘self'” Header unset X-Content-Security-Policy Header add X-Content-Security-Policy “default-src ‘self'” Header unset X-WebKit-CSP Header add X-WebKit-CSP “default-src ‘self'” You may also be interested in adding those headers: Header set X-Content-Type-Options “nosniff” Header set X-XSS-Protection “1; mode=block” Header set X-Frame-Options “DENY” Header set Strict-Transport-Security “max-age=631138519; includeSubDomains”       Along […]

Read more
HTTP Strict Transport Security for Apache, NGINX and Lighttpd

HTTP Strict Transport Security (often abbreviated as HSTS) is a security feature that lets a web site tell browsers that it should only be communicated with using HTTPS, instead of using HTTP. This tutorial will show you how to set up HSTS in Apache2, NGINX and Lighttpd. It is tested with all mentioned webservers, NGINX […]

Read more
Apache Configure CORS Headers for Whitelist Domains

Apache Configure CORS Headers for Whitelist Domains     In the current implementation of Cross Origin Resource Sharing (CORS) the Access-Control-Allow-Origin header can only provide a single host domain or a wildcard as the accept value. This is not optimal when you have multiple clients connecting to the same virtual server and simply want to […]

Read more
Linux: include hidden files in tar archive

When you create a tar archive of a directory tree the hidden files are normally not included. Here’s how to include the hidden files. Say you have a web directory called “/var/www/html/mysite/” that contains the following tree: .htaccess index.php logo.jpg style.css admin_dir/.htaccess admin_dir/includes.php admin_dir/index.php Normally you would use the tar command like this: tar czf […]

Read more
Reset your WordPress password via email

Reset your WordPress password via email If you’ve forgotten your WordPress admin password, you can reset it via email from the WordPress dashboard login page following these steps: Go to your WordPress login page (example.com/wp-admin) Click on Lost you password? at the bottom Enter the Username or E-mail of your WordPress admin user, then click […]

Read more

Hit Counter provided by dental implants orange county