Tuesday, May 22, 2012

How to create Virtual Host in Apache













The term Virtual Host refers to the practice of running more than one web site (such as company1.example.com and company2.example.com) on a single machine. Virtual hosts can be "IP-based", meaning that you have a different IP address for every web site, or "name-based", meaning that you have multiple names running on each IP address. The fact that they are running on the same physical server is not apparent to the end user.
Apache was one of the first servers to support IP-based virtual hosts right out of the box. Versions 1.1 and later of Apache support both IP-based and name-based virtual hosts (vhosts). The latter variant of virtual hosts is sometimes also called host-based or non-IP virtual hosts.

You can configure in your Apache server step by step below:

1, Enable LoadModule rewrite_module modules/mod_rewrite in file httpd.conf in apache/apache_v_x/conf directory

2, Enable Virtual hosts
Remove # in this line Include conf/extra/httpd-vhosts.conf in file httpd.conf in apache/apache_v_x/conf directory

3, Add virtual host in httpd-vhosts.conf in apache/apache_v_x/conf/extra directory
Add following script

<VirtualHost *:80>
ServerAdmin webmaster@angkordigitalsolutions.localhost
DocumentRoot "C:\wamp\www\angkordigitalsolutions"
ServerName angkordigitalsolutions.localhost
#ServerAlias www.dummy-host.localhost
#ErrorLog "logs/dummy-host.localhost-error.log"
#CustomLog "logs/dummy-host.localhost-access.log" common
</VirtualHost>

4, Create host in C:\Windows\System32\drivers\etc
127.0.0.1 angkordigitalsolutions.localhost

Last, you need to restart your server

Related post: How to increase web app performance better

Tuesday, February 14, 2012

Introduction to HeidiSQL 7.0.0.4053

Some infos around HeidiSQL Project website: http://www.heidisql.com/ Google Code: http://code.google.com/p/heidisql/ *** What is HeidiSQL? HeidiSQL is an easy-to-use interface and a "working-horse" for web-developers using the popular MySQL-Database. It allows you to manage and browse your databases and tables from an intuitive Windows® interface. With HeidiSQL you will also be able to * Manage Microsoft SQL Servers, with a reduced feature set * Generate nice SQL-exports * Synchronize tables between two databases * Manage user-privileges * Import text-files * Export grid-data as CSV, HTML, XML, SQL, LaTeX and Wiki style * Browse and edit table-data using a comfortable grid * Create and edit tables, views, stored routines, triggers and scheduled events * Bulk edit tables (move to db, change engine, collation etc.) * Batch-insert ascii or binary files into tables * Write queries with customizable syntax-highlighting and code-completion * Profile your queries * Pretty reformat disordered SQL * Monitor and kill client-processes * Connect to servers via commandline * Find specific text in all tables of all databases of one server * Optimize and repair tables in a batch manner * And much more *** Requirements: HeidiSQL runs fine on Windows 2000, XP, Vista and 7. Running HeidiSQL on Wine/Linux also works fine, apart from some minor graphical glitches, e.g. the transparent areas of all icons are displayed with black color. HeidiSQL does not run on Windows 95/98 or ME, as the Unicode extensions are not available on these systems. *** Command line switches Although HeidiSQL is a pure GUI application, it can be automated for connecting and opening files via command line parameters. Parameter names are case sensitive and are based on those used by the MySQL command line applications, e.g. mysqldump. -d, -description Session name -h, -host Host name -u, -user User name -p, -password Password -P, -port Port (defaults to 3306 if not given) -S, -socket Socket name (for connecting via named pipe) --psettings Custom filename for portable settings. Ignored if file does not exist. Examples: * Start over using stored settings from session "xyz": c:\path\to\heidisql.exe -d=xyz c:\path\to\heidisql.exe -description=xyz * Connect with different username or port: c:\path\to\heidisql.exe -d=xyz -u=OtherUser c:\path\to\heidisql.exe -d=xyz -P=3307 * Connect to a non-stored session: c:\path\to\heidisql.exe -h=localhost -u=root -p=Mypass -P=3307 * Open multiple .sql files in query tabs: c:\path\to\heidisql.exe fileA.sql path\to\fileB.sql fileC.sql ... * Use custom portable settings file: c:\path\to\heidisql.exe --psettings=c:\temp\p.txt *** License: HeidiSQL is OpenSource and released under GPL (GNU GENERAL PUBLIC LICENSE). Probably HeidiSQL saved you a lot of time and you like it. In this case you may make a donation here: http://www.heidisql.com/donate.php *** Credits: Ansgar Becker (project lead and development), David Dindorp (former development), Francisco Ernesto Teixeira (former development), Andrew Brampton (LaTeX export), Sven Lorenz (graphics), Mikkel M. Gerhardt-Pedersen (additional bugfixes), Mike Lischke + Timo Tegtmeier (VirtualTreeView, GLPL), Maël Hörz (SynEdit, MPL), Iztok Kacin (Cromis.DirectoryWatch, BSD License), Mark James (Silk icons, Creative Commons 2.5), Jordan Russell (Inno Setup) 1000 thanks to MySQL for great database software To download file install: heidisql.googlecode.com/files/HeidiSQL_7.0_Setup.exe Resource: file readme.txt content of heidisql

Friday, February 10, 2012

Introduction to iReport

iReport is the free, open source report designer for JasperReports. Create very sophisticated layouts containing charts, images, subreports, crosstabs and much more. Access your data through JDBC, TableModels, JavaBeans, XML, Hibernate, CSV, and custom sources. Then publish your reports as PDF, RTF, XML, XLS, CSV, HTML, XHTML, text, DOCX, or OpenOffice.

Thursday, February 9, 2012

Kloxo Installation Guide


Kloxo Installation Guide

Prerequisites

1) A dedicated or virtual server running CentOS or Red Hat EL 5.x. CentOS 6.x is not currently supported.
2) At least 256 MB of RAM (enough to run Yum).
3) At least 2 GB of free disk space for Kloxo and related services.
4) If you partitioned your disks manually, make sure you have a large /tmp. Kloxo uses /tmp to create and store backups temporarily and the process will fail if there is not enough space.

Before we begin...

You have to disable SELinux by editing /etc/sysconfig/selinux and changing the line to selinux=disabled. This will keep SELinux from being enabled on your server next boot.

Then you must run the following command as root to disable SELinux for the current session:

# su - root
# setenforce 0


If you are unsure this procedure worked, you can run /usr/sbin/sestatus to check its status. Failure to correctly disable SELinux will render your Kloxo install useless and an OS reload may be required to properly reinstall it.
Also, make sure the ports 7778/tcp and 7777/tcp are open in your server firewall or you won't be able to connect to Kloxo web panel when the install completes.

Installing Kloxo

Kloxo installation consists of downloading kloxo-installer.sh from download.lxcenter.org and executing it as root. The script will present you with a few questions and sometimes ask for a password (enter your root password).

If you don't have MySQL server already installed, you must run:

# su - root
# yum install -y wget
# wget http://download.lxcenter.org/download/kloxo/production/kloxo-installer.sh

To install as Master (Default Single Server):
# sh ./kloxo-installer.sh --type=master

To install as Slave:
# sh ./kloxo-installer.sh --type=slave


If you already have MySQL installed and set a root password, you must run:

# su - root
# yum install -y wget
# wget http://download.lxcenter.org/download/kloxo/production/kloxo-installer.sh
# sh ./kloxo-installer.sh --type=<master/slave> --db-rootpassword=PASSWORD


Once kloxo is installed, you can connect to http://YOUR_SERVER_IP:7778 and you will be presented with a login screen. Login as admin with password adminand once you are in, Kloxo will ask you to change the default password to a secure one.

Packages installed initially1:


Web ServicesFunction
apache (2.x)The Apache HTTP Server is a powerful, efficient, and extensible web server.
php (5.2.x)PHP is an HTML-embedded scripting language.
pure-ftpdPure-FTPd is a fast, production-quality, secure and standard-comformant FTP server especially designed for modern Linux and FreeBSD kernels.
awstatsWeb Statistics


Mail ServicesFunction
qmail-toasterqmail is a small, fast, secure replacement for the sendmail package, which is the program that actually receives, routes, and delivers electronic mail.
courier-imap-toasterCourier-IMAP is an IMAP server for Maildir mailboxes.
vpopmailvpopmail is a collection of programs and a library to automate the creation and maintence of virtual domain email for qmail installations.
RoundcubeWebmail (Ajax)
HordeWebmail


DNS ServicesFunction
bindBIND (Berkeley Internet Name Domain) is an implementation of the DNS (Domain Name System) protocols.
bind-chrootSecures BIND server


Database ServiceFunction
mysql-serverMySQL is a multi-user, multi-threaded SQL database server.


1 You are able to switch services after install at the web panel. Apache/Lighttpd; BIND/djbdns; spamassassin/bogofilter; etc.

Troubleshooting

If you cannot connect to you Kloxo Control Panel, please check if Kloxo is running and your server firewall is not blocking access to ports 7777/tcp and 7778/tcp. You may temporarily disable it by running /etc/init.d/iptables stop and if that is the cause you may be interested in the firewall script example contributed by Kloxo users.

If you still cannot access your panel, go to our forums at http://forum.lxcenter.org (external link) and request help (you may want attach the file /root/kloxo-install/kloxo-linux/kloxo_install.log for easier troubleshooting).

Final Considerations

1) Keep in mind that Kloxo will not manage your server firewall (iptables rules). For that, you may want to install third-party firewall management scripts such as CSF (external link) (cache) or APF (external link) (cache) and its complements to detect and block threats like brute-force attacks and unauthorized processes and users.
2) If you are not familiar with the command line (shell), you might want to try Webmin (external link) (cache) for basic system administration tasks. It should not conflict with Kloxo as long as you avoid managing the services listed before with it.
3) Kloxo will never update your OS (CentOS/Red Hat) automatically. It's up to you to monitor security bulletins for your Operating System and update as necessary.
4) Kloxo will never update itself by default. You can set Auto-Update? Kloxo within the GUI. The Auto update will run at the 10th day each month and you as "Admin" will be notified by email. To update manualy, click the Update home button from the web panel OR run on the shell (as root) /script/upcp. At the web panel, you are presented with release notes that describe what's changed in the newer versions so you can act at your own discretion.


Resources: http://wiki.lxcenter.org/Kloxo+Installation+Guide

Introduction to Kloxo



Introduction to Kloxo
Kloxo is a light-weight control panel that is both memory friendly and powerful. It has all the features included in all leading control panels such as mail, spam filter, PHP, CGI, Perl, SUexec, FTP, MySQL and much more. This guide is meant to get you started with Kloxo and explain the basic features needed to get your website up and running.


Logging In

There are several ways to access Kloxo:

1. By clicking the "Kloxo" tab through HyperVM (no login required)

2. http://192.168.0.1:7778 or https://192.168.0.1:7777 - You can access the control panel through any IP address allocated to the server. This is useful when your domain transfer has not yet propagated. (replace 192.168.0.1 with your VPS's IP address)

3. http://yourdomain:7778 - You can access the control panel through any hosted domain by putting :7778 at the end of the domain. (non-SSL)

4. https://yourdomain:7777 - You can access the control panel securely using SSL through any hosted domain by putting :7777 at the end of the domain.

A login window will appear. Enter your username (admin) and password and you should have successfully logged in.