Categories
AWS

AWS – How to Unmount Volumes ?

Make sure the volume isn’t in use.

sudo lsof +f -- /mnt/use_your_mount_point

Kill processes pid

kill -9 pidNumber

umount

sudo umount --verbose /mnt/use_your_mount_point
Categories
AWS

How to mount duplicate uuid aws volume ?

Error

[128456.266831] XFS (xvdg): Filesystem has duplicate UUID 483f88bd-990a-404d-8408-71218fa83324 - can't mount

Solution

mount -o nouuid /dev/sdb7 /yourfolder
Categories
MySql

Mysql Open remote access

Connect

mysql -u root -p
USE mysql;
SELECT user,host FROM user;

grant privileges

from specific IP

GRANT ALL PRIVILEGES ON *.* TO [email protected]_ip IDENTIFIED BY ‘root_password‘ WITH GRANT OPTION;

From everywhere

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY ‘root_password‘ WITH GRANT OPTION;

Flush privileges

FLUSH PRIVILEGES;
Categories
Technical

How to collapse swagger tag categories by default ?

Add docExpansion:'true', in the file swagger/index.php

 <script>
    window.onload = function() {
      // Begin Swagger UI call region
      const ui = SwaggerUIBundle({
        //url: "http://davidr3.sbx.4over.com/swagger.json",
        url: "../swagger.json",
        dom_id: '#swagger-ui',
        docExpansion:'true',
        deepLinking: true,
        presets: [
          SwaggerUIBundle.presets.apis,
          SwaggerUIStandalonePreset
        ],
        plugins: [
          SwaggerUIBundle.plugins.DownloadUrl
        ],
        layout: "StandaloneLayout"
      })
      // End Swagger UI call region

      window.ui = ui
    }
  </script>

Categories
News

Losangeles.raleche.com New website listing

losangeles.raleche.com – New website directory about Los Angeles! Stay tuned new directories to be added over time

Go Visit losangeles.raleche.com Now !

Categories
Apache Hacker Web Server

Whitelist EC2 server to send email

Below find url that will allow your ec2 servers to send emails

https://console.aws.amazon.com/support/contacts?#/rdns-limits
Categories
Apache Hacker Security

Logwatch to monitor your server daily

Install logwatch

yum install logwatch

send logwatch email

logwatch --detail Low --mailto [email protected] --service http --range today

Logwatch configuration file

vim /usr/share/logwatch/default.conf/logwatch.conf

Categories
Apache Hacker Security

Install mod24_security VERY IMPORTANT

Install mod security24 very important

yum install mod24_security
Categories
Apache Hacker

Stopping “connect” attacks in apache (solution)

Then add the following right after it and restart apache to activate.

# Second, we configure the "default" Location to restrict the methods
allowed
# to stop CONNECT method attacks.
#
Order allow,deny Deny from all

I don’t like the idea of my server responding to requests for random hostnames, even if it serves local content. How can I deny these requests?

<VirtualHost *:80>
  ServerName default.only
  <Location />
    Order allow,deny
    Deny from all
  </Location>
</VirtualHost>


Categories
Technical

untar linux compressed file

tar -zxvf yourfile.tar.gz