ufw: firewall

status

config

 

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-14-04

install mongodb for php7

linux alias / bash alias

Insert into ~/.bash_aliases or ~/.bashrc

More information: http://askubuntu.com/questions/1414/how-to-create-a-permanent-alias

use Fail2Ban to secure your application

Here is an example how to configure Fail2Ban to read your application’s log file and detect malicious requests.

The Log File:

The Filter:

The Filtertest:

The Jail:

Here are some usefull links:

creating a vagrant base box from an existing base box

A vagrant Ubuntu Server 32bit 14.04 LTS with Apache, MySQl, PHP and several development tools installed.

The server contains the following components:

  • apache
  • mysql
  • php 5.5
  • sqlite
  • vim
  • git
  • composer
  • nodejs, npm
  • cUrl
  • xdebug

The result can be used here: https://atlas.hashicorp.com/alexwenzel/boxes/webdev

Prepare the server

Initzialize vagrant:

Edit the initial vagrant file:

Then create the “www” folder and start vagrant:

SSH into the new vagrant box:

A quick ubuntu update:

Apache Webserver:

http://httpd.apache.org/docs/2.4/sections.html

PHP, MySQL, SQLite, PHP cUrl, Git:

NodeJs, npm:

Composer:

 xDebug:

http://alexwenzel.de/2014/191/php-profiling-xdebug

Create vagrant box file

Test the box:

Linux Kommandozeile

Diverses

Convert to lowercase

Datei verschieben ohne Besitzer zu ändern

Geht nur mit ”cp -p” und dann die original Datei löschen.

http://unixhelp.ed.ac.uk/CGI/man-cgi?cp

Symlink zwischen Ordnern

Deutsches Keyboard Layout für die Konsole

oder

count lines of code (loc)

Gefunden auf: http://stackoverflow.com/questions/790956/count-lines-in-a-php-project

PHP:

JavaScript:

Tail

Packen & entpacken

http://www.linux-fuer-alle.de/doc_show.php?docid=76

tar.gz packen:

tar.gz entpacken:

zip packen:

zip entpacken:

My Apache cheat sheet

The VirtualHost configuration is located here

Defining a VirtualHost

I am using Vagrant on Windows, so I have to add this domain to my Windows hosts file:

The Apache Service and its commands

Possible commands:

  • start
  • stop
  • graceful-stop
  • restart
  • reload
  • force-reload
  • start-htcacheclean
  • stop-htcacheclean

Apache2 modules

Enabling a module:

Disabling a module:

List all enabled modules:

Available modules (on my maschine):

 

install nodejs, npm and gulp on ubuntu

The reference can be found here:

https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

The commands to install nodejs and npm on ubuntu:

Check nodejs and npm installation:

Install Gulp (global/local):