Redirect link

Single Hop http to https for non-www or www Domain with .htaccess If you are behind a reverse proxy like Cloudflare or nginx this condition can help make sure the redirect is triggered RewriteCond %{HTTP:X-Forwarded-Proto} !https Final destination: #BEGIN force https from <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTP_HOST} ^(www\.)?hammerpedia\.com [NC] RewriteRule ^(.*)$$1 …

Redirect link Read More »

LetsEnscrypt SSL

Cài đặt chứng chỉ Let’s Encrypt SSL trên server HocVPS Script # Stop Nginx service nginx stop # Issue SSL Let’s Encrypt /opt/letsencrypt/certbot-auto certonly –standalone #Check nginx syntax nginx -t #Restar Nginx service nginx restart  

Add SSHkey to VPS Create .ssh folder in root foder mkdir -p ~/.ssh echo public_key_string >> ~/.ssh/authorized_keys Phần quyền, chỉ root account mới có thể access. chmod -R go= ~/.ssh chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys   Disabling Password Authentication on your Server sudo nano /etc/ssh/sshd_config PasswordAuthentication no sudo service ssh restart

How To Install WordPress on Linux/CentOS 7   Step Two — Install WordPress Before we download WordPress, there is one PHP module that we need to install to ensure that it works properly. Without this module, WordPress will not be able to resize images to create thumbnails. We can get that package directly from CentOS’s default repositories using yum: sudo …

How To Install WordPress on Linux/CentOS 7 Read More »

Create virual host in apache

Step 1) C:\WINDOWS\system32\drivers\etc\ Open the “hosts” file : localhost Step 2) xampp\apache\conf\extra\httpd-vhosts.conf DocumentRoot C:/xampp/htdocs/test/ ServerName DocumentRoot C:/xampp/htdocs/example/ ServerName Step 3) C:\xampp\apache\conf\httpd.conf. Scroll down to the Supplemental configuration section at the end, and locate the following section (around line 500), Remove the # from the beginning of the second …

Create virual host in apache Read More »