Linux

Quick tips on how to manage an Amazon Linux server:


STEP 1 - YOU NEED A PPK KEY FILE FOR SECURITY

Putty:    www.putty.org

Use puttygen to generate a .ppk file from the amazon .pem key file.


STEP 2 - USE WINSCP TO CONNECT AND EDIT FILES


A)  Download WinSCP:   www.winscp.net

B)  Use the PPK encryption file as your password.


STEP 3 - CONNECTING TO MY SQL

How to create a HEIDI connection to MYSQL database on Amazon ec2:

Heidi SQL:     http://www.heidisql.com/

https://vtvlab.wordpress.com/2011/12/13/connect-to-mysql-server-from-heidisql-with-ssh/


Good comparison of SQL versions:

http://troels.arvin.dk/db/rdbms/#insert


EDIT PHP.ini with PUTTY:

1)  sudo nano /etc/php.ini

2) Make a change

3) To restart apache: sudo service httpd restart

Edit .htaccess (httpd.conf)

1)  sudo nano /etc/httpd/conf/httpd.conf

2)  Make and change and save

3)  Restart service sudo service httpd restart


To view PHP log:

sudo nano /var/log/httpd/error_log

To view log view of default sendmail log function:

sudo nano /var/log/maillog




If using HTML glyphecons and fonts don't work and you get a CORS message, edit httpd file:

<FilesMatch ".(eot|ttf|otf|woff|woff2)">
Header set Access-Control-Allow-Origin "http://etfanalyst.com"
</FilesMatch>


SSL:

To enable:    sudo yum install -y mod24_ssl

To edit SSL config:   sudo nano /etc/httpd/conf.d/ssl.conf