Sunday, 20 July 2014

How to build a read only file server using Apache in Debian


This post explains how to create an anonymous read only file server using apache web server in Debian.

INSTALL APACHE


First we need apache installed in our system:

Debian:
$ sudo aptitude install apache2

In my system: apache 2.4.9-2 version gets installed.


Centos:
$ sudo yum install httpd


HOW TO LISTEN TO A PORT DIFFERENT FROM 80


We will set our file server to listen on port 2221.


Edit /etc/apache2/ports.conf and add this line:
Listen 2221

Restart apache server:
$ sudo apache2ctl restart

After having apache listening on port 2221 we will be able to edit configuration file to add a virtual host for that port.

<VirtualHost *:2221>
...
</VirtualHost><

http://httpd.apache.org/docs/current/bind.html


ENABLE REWRITE MODULE

Thursday, 3 July 2014

How to install Luarocks from sources in Debian


In this article we are going to install luarocks software in a Debian box.


Luarocks is a system to manage and deploy lua modules ("rocks").

It also tracks and installs needed dependencies when installing a new lua rock.

luarocks.org official web site.


Install lua


First we need lua scripting language to be installed. (I get lua 5.2 version)

$ sudo aptitude install lua5.2


Lua development files will also be necessary to compile sources afterwards.

$ sudo aptitude install liblua5.2-dev


Get and compile luarocks source code


Get luarocks source code