Skip to content

Instantly share code, notes, and snippets.

@marios-zindilis
marios-zindilis / gist:a58896d0ca4e4767a389
Created July 21, 2014 03:21
Redirect all HTTP requests to HTTPS
RewriteEngine on
RewriteRule ^(.*)$ https://example.com$1 [R=301,L]
@marios-zindilis
marios-zindilis / openDCIM Installation CentOS
Created May 25, 2013 06:01
This is the source code in MediaWiki Syntax, of the page http://zindilis.com/docs/openDCIM_Installation_on_CentOS_6.4 This is released in the Public Domain, except from the section "Enable HTTPS" which is a snippet from CentOS Wiki and is licenced under Creative Commons Attribution-Share Alike 3.0 Unported License.
This is a bottom-up guide on installing openDCIM on a CentOS server.
This guide is released in the '''Public Domain''', except from the section "''Enable HTTPS''" which is a snippet from [http://wiki.centos.org/HowTos/Https CentOS Wiki] and is licenced under [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-Share Alike 3.0 Unported License].
=== Software Used ===
This guide has been tested with:
* openDCIM version 2.1, the current version as of the writing of the guide, but it should apply to previous versions, and possibly to future ones as well.
* CentOS 6.4 Minimal 64bit, with the latest updates as of 2013-05-25, but it should apply to previous versions, and possibly to future ones as well.
* The <code>vim</code> editor is used in the commands below, because it adds nice colored syntax highlighting when editing configuration files. If you don't have <code>vim</code>, you can use <code>vi</code>, which comes preinstalled with CentOS.
@marios-zindilis
marios-zindilis / VirtualHost for multiple WSGI applications
Last active September 9, 2018 10:24
VirtualHost definition (Apache2 on Ubuntu 12.04) for running multiple WSGI applications under the same domain. This was done for the purpose of running the example applications on http://webpy.org/src/ on a single test server. Some discussion for this at: https://groups.google.com/forum/#!topic/webpy/fB_DqRAg7ho
<VirtualHost *:80>
ServerAdmin marios@example.com
ServerName example.com
DocumentRoot /var/www/example.com
# Aliases (most deeply nested URL should come first):
Alias /test/web-py/blog /var/www/example.com/test/web-py/blog/index.py/
Alias /test/web-py/books /var/www/example.com/test/web-py/books/index.py/
Alias /test/web-py/wiki /var/www/example.com/test/web-py/wiki/index.py/
@marios-zindilis
marios-zindilis / c1842-running-config-for-ssh
Created May 16, 2012 11:08
Configuration of a Cisco 1841 in PacketTracer, for SSH
Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fa 0/1
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown