All posts by Rajmahendran P

NGINX server SSL installation and SSL upgrade

Please follow the below steps to Install and Upgrade the SSL in nginx server:

Step1:  Open putty SSH

Step2: Redirect to Domain Config file to find / create the SSL key and SSL crt location.

Step3: Please follow the below step to find view/edit the domain config file.
 — Once logged into SSH.
 — From current folder, redirect to root folder using below comment.
     Comment:  cd ..
     Also, please check the below image.
    

—From root folder, redirect to /etc/nginx/conf.d folder to reach the domain.conf file.
    Comment: cd etc/nginx/conf.d

— From conf.d folder, list out the all files using below comment to find the domain config file name.
     Comment: ls -a (It will list all files)

— Edit the particular domain config file using below comment.
     Comment: vi domainname.com.conf

— It will open the Edit view, there we could add SSL key and SSL crt location and Edit. Files name should be domainname.com.crt and domainname.com.key
     Please find the below image for more information.

— Click i key to enable the insert mode to edit the file.
— Update the ssl_certificate and ssl_certificate_key path based on your need.
— Click “Esc” and “!wq” and “Enter” to save the changes.

— Create / Go to the SSL folder “etc/nginx/ssl” folder

— Create or edit certificate key file “domainname.com.key” and add the Privare key value as like below image and use below comment.
   Comment: vi domainname.com.key
                       Enable Insert using i key
                       Add private key
                       Click Esc key
                       Enter :wq and click Enter to save the file.
   As like below image.

— Same process to add three CERTIFICATE key in same file called “domainname.com.crt”.

— Finally restart the nginx server 
      Comments for Debian/Ubuntu/RHEL/CentOS Linux
      # /etc/init.d/nginx restart 
     OR
     # /etc/init.d/nginx reload
     OR
      # service nginx restart
      OR
      # service nginx reload

DONE!!!
 

Emulator: Incompatible HAX module version 3,requires minimum version 4

#1. Need to upgrade intelhaxm-android.exe as version 4

#2. I have tried below Solution:

Windows

  1. In your Android SDK folder, look in extras\intel\Hardware_Accelerated_Execution_Manager\
  2. Run intelhaxm-android.exe 

Mac

  1. Open the HAXM directory

    cd $ANDROID_HOME/extras/intel/Hardware_Accelerated_Execution_Manager
  2. Run the installer:

    • Mount the HAXM *.dmg file, then run the *.mpkg contained inside it

    or

    • Execute $ ./silent_install.sh

#3. Its not worked for me. So, I have downloaded intelhaxm-android.exe from below URL and installed new version.

https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm

Fix wordrpess permalink not working issue in Linux OS – Install mod_rewrite module on server

Step 1: Use below comment to install 
sudo a2enmod rewrite

Step 2: After successful install, restart the apache using below comment.
service apache2 restart
or
sudo /etc/init.d/apache2 restart

Step 3: Check the site to confirm 404 error fixed or not.

Step 4: To fix the issue, go to “/etc/apache2/apache2.conf ” and edit apache2.conf using below comment.
vi apache2.conf

Step 5:  Replace the “AllowOverride None” with “AllowOverride All”. So, it will be look like below image.

Step 6: Use “Esc” and type  “:wq” comment to save and quit after completed the changes.

Step 7: Reload apache using below comment.
apache2 reload

OR

systemctl restart apache2

Step 8: I hope your issue fixed now.

Step 9: Still you have the issue! Please follow the below reference image instruction. I hope, this is more helpful for you. (Click below image to view)

Port Forwarding – Binatone port forward settings – Access local xampp using static IP

Step 1: Open your system comment and type “ipconfig”.

Step 2: Check your system “Default Gateway” and “IPv4 Address” using comment “ipconfig” as like below image.

Step 3: Open your router settings page using Default Gateway. As per my case, use “192.168.1.1” in browser to access the settings page.

Step 4: Go to Port Forwarding settings page and forward the required post to your system. We could use the port based on your need.

Step 5: I need to post the 80, Because I need to access the xampp from remote or through internet. So, my local system xampp running under  port 80.

Step 6: Also, Port Forwarding settings will change based on router. As per my case please find the below image.

Binatone port forward settings
Go to -> Advanced -> NTA -> Virtual Server and follow below settings.

Step 7: All settings DONE. Now testing, Check your system IP. Just type “What is my IP” in Google.

Step 8: For example your IP is 77.777.77.88. While I access through 77.777.77.88:80 OR 77.777.77.88, it will post to local system xampp.

Update client_max_body_size value in NGINX SERVER

   1. Login to SSH through putty as root user.

   2. Redirect to site nginx config file as like below. 
          cd etc/nginx/conf.d/

   3. List all domain config file in above folder using below comment.
          ls -a

   4. Edit respective domain config file using below comment
          vi domain.com.conf

   5. Use “i” letter in windows to change the comment view files into edit mode. To know more about file edit
 
    6. Add below line if its not exist in the config file. OR update values based on your need. 
         client_max_body_size 500m;

    7. Finally restart Nginx using below comments.
          service nginx reload
 
    8. DONE.

Nginx server settings update for memory limit

  1. Update Memory limit in Ngnix server 

    1. Login to SSH through putty

    2. Redirect to PHP config file as like below.
     cd /etc/php-fpm.d   

     3. List all files from  “php-fpm.d”    directory using below comment
         ls -a

    4. Edit respective domain config file using below comment
         vi domainname.conf

    5. Use “i” letter in windows to change the comment view files into edit mode.

    6. Add below line if its not exist in the config file. OR update values based on your need.
          php_admin_value[memory_limit] = 500M
          php_admin_value[post_max_size] = 500M should be larger than upload_max_filesize and smaller than memory_limit.
          php_admin_value[upload_max_filesize] = 450M    (Important: This value should be low compare to other value)
          php_admin_value[max_input_time] = 3000
          php_admin_value[max_execution_time] = 3000

    7. user “Esc” and type “:wq” to save and quit. Also, please refer more file edit comment options below.
         vi filename — Edit file
         i to insert
         a to append
         x to delete
         dd to delete a line
         : to begin a command sequence
         :w to save
         :q to quit
         :q! to quit without saving
         :wq to save and quit

    8. Finally restart the PHP using below comments.

          In order to restart php-fpm, the correct command is
    # systemctl restart php-fpm

          To check the state of php-fpm following a restart you can         run:
    # systemctl status php-fpm

  2.   Still its not working! Please follow this post to increase  client_max_body_size value.

How to Disable directory Listing Directory browsing in apache Web Server

  1. Go to “/etc/apache2/apache2.conf”
  2. Change the following code 
    <Directory /var/www/>
     Options Indexes FollowSymLinks
     AllowOverride None
     Require all granted
    </Directory>

    Change above code as like below. Removed Indexes from first line.

    <Directory /var/www/>
    Options FollowSymLinks
    AllowOverride None
    Require all granted
    </Directory>

    Please follow the below video instruction:

  3. Restart Apache 2 web server, enter:

    # /etc/init.d/apache2 restart
    OR
    $ sudo /etc/init.d/apache2 restart
    OR
    $ sudo service apache2 restart