plesk: redirect to https for entire site

plesk 12

https://der-linux-admin.de/2015/12/plesk-ssl-redirect-https-fuer-domain-erzwingen-und-www-entfernen/

force www for http and https

Found here:

http://stackoverflow.com/questions/4916222/htaccess-how-to-force-www-in-a-generic-way

silex and the trailing slash

Wrong route definition:

Right route definition:

The .htaccess file:

 

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:

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):