Archive

Archive for the ‘Linux’ Category

Manage your virtual hosts on apache server easily

May 28th, 2011 No comments

Building up and making all modifications on your server is pretty boring. There is no need to find the sun again and again. I’ve had to go through the process of reconfiguring my virtual hosts for Apache2 several times and i found a pre modified shell script and modified the script according to my needs. This script enables you to create, destroy your virtual host in a second.

you can download the script from here : vhost.txt or;

mkdir ~/bin
cd ~/bin
wget http://samet.kilictas.com/wp-content/uploads/2011/05/vhost.txt
mv vhost.txt vhost
chmod 755 vhost

Now, to invoke the script, type the following:

. ~/bin/vhost

By using this script you can create, destroy a virtual host. In order to create a new host on your server user following command by replacing appreciate values:

vhost create <domain> <admin -email> <host -ip>

The script creates required directories,files as shown below;

Web directories
/www/htdocs/$domain

Web cgi-bin
/www/cgi-bin/$domain

Web logs
/www/logs/$domain/apache2
/www/logs/$domain/apache2/access.log
/www/logs/$domain/apache2/error.log

then builds virtual host config file and enables it right away (enabling is optional), which is placed in following directory

/etc/apache2/sites-available/$domain

After getting done with all these process it simply creates a little info file

/www/$domain/logs/site_info

Great you have created and enabled your virtual host, you may need to destroy a virtual host, here is how;

vhost destroy <domain>

Read more…

VN:F [1.9.22_1171]
Rating: 5.5/10 (4 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)
Categories: General, HowTo, Linux, Tips Tags: , ,

Bash Shell Scripting Tutorial

April 30th, 2010 No comments

Basics
This tutorial assumes that you already know how to log in to your UNIX machine, bring up the bash shell, and run basic commands such as ls and cat. Getting to this point is fairly easy, but unfortunately this is the level that most users stay at indefinitely. This tutorial is intended to help you start to learn the more advanced features of using a shell, and specifically bash, one of the most powerful shells available.

Please note that most of the command themselves are not explained; you can examine their functionality yourself by either reading their man page, or just experimenting with them to see what they do.

Redirection
Normally programs take input from our keyboard, and display the output to our screens. However, these are just the defaults – UNIX has the ability to redirect the input (commonly referred to as stdin, short for standard input) and output (commonly referred to as stdout, short for standard output).
Read more…

VN:F [1.9.22_1171]
Rating: 7.0/10 (4 votes cast)
VN:F [1.9.22_1171]
Rating: +2 (from 2 votes)
Categories: General, HowTo, Linux Tags: , , ,

How to enable TCP connections to XServer?

December 7th, 2009 No comments

sudo gedit /etc/gdm/gdm.schemas

find:

<schema>
<key>security/DisallowTCP</key>
<signature>b</signature>
<default>true</default>
</schema>

shift from true to false:

<schema>
<key>security/DisallowTCP</key>
<signature>b</signature>
<default>false</default>
</schema>

VN:F [1.9.22_1171]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Categories: Linux, Tips, Ubuntu Tags: , ,

Gedit Modifications for PHP

May 17th, 2009 3 comments

Since i am coding with codeigniter framework on gedit, i was looking for snippets for codeigniter on gedit

download gedit snippet for codeigniter

By the way if you want to make your gedit more useful for programming surely you may add some third party plugins as many as you want or simply just active default plugins. Idea is that firstly download a plugin then extract its content to ‘~/.gnome2/gedit/plugins/’ directory. Once you have installed the plugin you want, you need to enable it via Edit>Preferences and then the Plugins Tab. Such as;

- Snippets
- Class Browser
- Bracket Completation
- Character Map
- Embedded Terminal
etc..

You can basicly find out third-party plugins by clicking on this link

VN:F [1.9.22_1171]
Rating: 6.0/10 (8 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Categories: General, Linux, PHP, Programming Tags: , ,

Save Penguins!

May 7th, 2009 1 comment

VN:F [1.9.22_1171]
Rating: 8.8/10 (4 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)
Categories: Linux Tags: