Running Multiple Websites (Drupal) using Apache on Linux Server

This notes is for someone who wants to create the second or third website after successfully installing the first drupal webstie on his linux server. Here, the step-by-step process:
I. Prepare the DNS Server for the second website.
- Go a head login to domain controller
- Create new DNS server by specifying the new domain name and the ip address of the linux server.
*For this case, let’s assume that we want to create the new website, named “www.newsite.com”

II. Configure Multiple Sites in Apache
1. Prepare new directory
- Go a head login to the linux server.
- Create a new directory in /var/www/ directory.
*I sugest to name it after the new site name, which is “www.newsite.com”
- Create index.html file inside the “www.newsite.com”, and maybe you can say “Hello World” on the body tag
2. Setup the Apache Config file
- Go to /etc/apache2/sites-available
- Open the default file, and uncomment every single line by putting # in front of every single line of code
- Go back to the /etc/apache2/sites-available, you’ll see the first main website that you have successfully installed
- Copy the first main website, and paste to the new name, which is “www.newsite.com”
- Open the “www.newsite.com” file, setup the ServerName, ServerAlias, DocumentRoot, and the Directory path.
Also, uncomment some of the original line on code. (*Please see Figure 1 for the Code Details)

multiple site apache

Figure 1: Sites-Available code

- Go to /etc/apache2/ and change the permission of sites-enabled file into 777
- Enable the “www.newsite.com” that is located in the sites-available by typing:
sudo ln -s /etc/apache2/sites-available/www.newsite.com /etc/apache2/sites-enabled/www.newsite.com
- Change the permission of sites-enabled back to 755
3. Restart apache by typing:
- sudo /etc/init.d/apache2 graceful , or by typing
- sudo /etc/init.d/apache2 restart
4. Check the new website by typing http://www.newsite.com on the browser
- if you can see the “Hello World”, it means you have succeed Configuring the Multiple Sites in Apache

III. Install the Drupal Site
- Go to /var/www/ and delete the “www.newsite.com” directory
- Download new version of drupal by typing:
sudo wget
http://ftp.drupal.org/files/projects/drupal-7.22.tar.gz

*Notes: you can check what is the newest version on the www.drupal.org
- Extract the drupal-7.22.tar.gz archive by typing:
sudo tar xvf drupal-7.22.tar.gz
- Rename the drupal-7.22 name into “www.newsite.com” by typing:
sudo mv drupal-7.22/ “www.newsite.com”
- Change the ownership of all “www.newsite.com” files to www-data.www-data by typing:
sudo chown -R www-data.www-data “www.newsite.com”

IV. Create Database and the Username in MySQL for the new drupal site
- Access the mysql by typing:
mysql -u root -p[the root password]
- Create the database name (e.g., newsite) by typing
create database newsite;
- Create the username and password (e.g., newsite) by typing:
CREATE USER ‘newsite’@'localhost’ IDENTIFIED BY ‘newsite’;
- Grant all privileges to newsite user for the database by typing:
grant all privileges on newsite.* to newsite@localhost;

V. Install the New Drupal Website
- Go to /var/www/www.newsite.com/sites/default
- Copy the default.settings.php and paste into settings.php name
- Type http://www.newsite.com into the browser url
- Follow the installation process

Categories: Tips | Tags: , , , , , | 2 Comments

An Attractive Website using JQuery

Building a website is one of my favorite job in the Computer Information area. I learned many different approaches and technologies in how to build a website, such as ASP.NET from Microsoft, Open Sources of PHP, JQuery, etc. I found so many interesting features on each of those technologies. In this post, I would like to talk about JQuery.

JQuery is one of my favorite technologies in building a website. JQuery is a javascript library that makes your website more attractive and looks more fancy and cool. According to the JQuery.com, “jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.”

Please see Figure 1 about sliding images using JQuery.

visit indonesia
Figure 1: Sliding images using JQuery

Please see Figure 2 about Google Map feature in JQuery.

visit indonesia scuba diving

Figure 2: Google Map using JQuery

Please see Figure 3 about a cool photo galleries using JQuery.

visit indonesia galleries

Figure 3: Photo gallery using JQuery

Please see this video below about the demo of one of my projects using JQuery

Categories: Portfolio | Tags: , , , , , , , , , | 1 Comment

XAMPP Configuration to Secure MySQL, PhpMyAdmin and Localhost

Tutorials :
http://www.apachefriends.org/en/xampp-windows.html#641

This is a note how to configure XAMPP after installing Xampp in your computer. You can download the installer in this link
http://www.apachefriends.org/en/xampp-windows.html#641

1. How to secure the MySQLand PhpMyAdmin after finished Installing Xampp (Please see Figure 1):
- Open the browser
- Type
http://localhost/security/xamppsecurity.php

- Type New Password for MySql Root password
- Check “http”
- Hit button “Password changing”

2. How to secure localhost (Please see Figure 1):
- Still in the
http://localhost/security/xamppsecurity.php

- Type “root” for User textfield on the XAMPP DIRECTORY PROTECTION (.htaccess)
- Type the password
- Hit button “Make safe the XAMPP directory”

Notes : After you hit button “Make safe the XAMPP directory”, the data will be safed in the following file:
C:\xampp\security\xampp.users
C:\xampp\htdocs\xampp\.htaccess

After you did the Instruction #1 and #2, the localhost (xampp configuration) will need authorization permission everytime user access it,
but any user can still access their projects that they put in “htdocs” folder by typing “localhost/[project folder or project name]“

Capture
Figure 1: XAMPP user interface

3. Create PhpMyAdmin Account User
- Access PhpMyAdmin site by typing
http://localhost/phpmyadmin/
on the browser
- Type “root” for User Name
- Type the password
- After you have been granted for accessing PhpMyAdmin, Click “Users” tab
- Click “Add user”
- Type the User name
- Pick “Local” on the Host drop-down list
- Type the Password
- The button “Generate” password is optional, so I reccomend not to click it
- Pick any kind of privilege for the new user
- Hit button “Add user”

Please see this video for the step-by-step process:

Categories: Tips | Tags: , , , , , , | 2 Comments

Virtual Meeting to Save Time and Energy

Today, technology runs very fast. Everybody and every company competes to each other to invent or re-invent new technology, which is to enable people face the world today. One of technologies that I usually use to help me communicate with my colleagues is Cisco WebEx.

Cisco webex is a software product from cisco company.
It is called virtual meeting. It creates and schedules meetings wherever you want, upload and share an agenda, files, and contacts.
Cisco webex also can record and replay your virtual meetings and share it with colleagues.

In short, it can be said that it is a combination of skype and dropbox and other technologies. So, it is combined together in cisco webex.

Why WebEx?
- Flexible
- Safe, it is running on the Cisco Cloud
- Increase productivity, you don’t have to spend times for traveling to meet colleagues.
- More Green

Special Features:
- Organize and share files
- Virtual Meetings
- Chat Messenger
- Share Desktop
- Recording Capabilities
- Mobile Access

Cisco offers some versions for the WebEx, such as the free edition, Premium 8, Premium 25, and Premium 100 (Please see Figure 1)

Capture
Figure 1: Cisco WebEx versions

Please feel free to watch the demo below that I used to communicate with my colleague.

Categories: Tips | Tags: , , , , , , , , , , , , | Leave a comment

C# ASP.NET Project

This is one of my projects using C# ASP.NET 4.

I built this project in Microsoft environment. I use SQL Server 2008 R2 for the database, and I use Visual Studio 2010 for the code editor.

Features of this website:

  • Advertising Custom Control using AJAX and Script Manager
  • Encryption of Credit Card and User Password
  • Income Report that can be open in Pdf, Excel, and Word documents
  • Good session management
  • Product Search
  • Regular Expression Validations of Credit Card and Email Address

Please check this out:

Categories: Portfolio | Tags: , , , , | Leave a comment

Install IBM Rational Outside the Program Files (Windows 7)

IBM Rational is a very useful tool in doing Object-Oriented Analysis & Design (OOAD). However, Windows 7 system sometimes prevents a user in running the program. For example, IBM Rational cannot be run by double clicking the icon. Sometimes we have to right-click the icon and Run as administrator. After run as administrator, sometimes the Windows 7 system bothers us again by asking the Administrator’s password. This situation is not effective if we maintain a computer lab with 50 computers.

ibm rational

Figure 1: IBM Rational overview

Since the IBM Rational asking Administrator’s password on every single time the users run it, we want to uninstall the IBM Rational and re-install it outside the Program Files folder.
Before we re-install it, we should create new folders that belong to us (not belong to the Win 7 system), so the Win 7 will not ask Administrator’s password anymore when the users run it.

I. Create Folders
- Create new folder at drive C:\ (I prefer to name it as “apps”)
- Create new folder at C:\apps\ (name it as “IBM”)
- Create new folder at C:\apps\IBM (name it as “SDP”)
- Create new folder at C:\apps\IBM (name it as “SDPShared”)
- Create new folder at C:\apps\IBM (name it as “Installation Manager”)
- Create new folder at C:\apps\IBM\Installation Manager (name it as “eclipse”)

II. Install IBM Rational
- Run lunchpad.exe as Administrator
- Click “Install IBM Rational Software Architect”
- Check only “IBM Installation Manager” and “IBM Rational Software Architect” package
- Next
- Next
- Accept the license agreement, then Next
- Click “Browse..” on the Shared Resources Directory field. Point to C:\apps\IBM\SDPShared folder
- Click “Browse..” on the Installation Manager Directory. Point to C:\apps\IBM\Installation Manager\eclipse folder
- Next
- Click “Browse..” on the Installation Directory field. Point to C:\apps\IBM\SDP
- Next
- Next
- Next
- Check Architect – Standard
- Next
- Next
- OK
- Install
- Finish

III. Apply License
- After you hit button “Finish” on the Installation process, it will ask you about eclipse windows firewall options
- Check the options that you prefer
- After that, it will ask you about the license
- Hit button “Manage License”
- Click “Apply License”
- Click “IBM Rational Software Architect 8.0.3
- Check “Import Product Activation Kit”
- Next
- Browse file, find .jar file
- Click Open
- Next
- Accept the license agreement
- Next
- Finish
- Finish
- Exit Workbench
- Restart the computer

Now, the users should be able to run the IBM Rational by double clicking the IBM Rational.

Categories: Tips | Tags: , , , | 2 Comments

Setup SQL Server 2008 R2 Instance

sql_server_2008_r2

I. Create Instance of the Database Services
- Login as administrator to your server machine
- Run the (setup.exe) as administrator
- Click Installation
- Click New Installation or add features to existing installation
- Click Ok, it will lead to Setup Support Rules
- Click Install
- Next
- Check “New Installation or add shared features” radio button
- Next, it will lead to Product Key
- Next, then accept the license terms
- Next
- Check “SQL Server Feature Installation” radio button, Next
- Select All on the Feature Selection, Next
- Next again, it will lead to Instance Configuration
- Check Named Instance” radio button
- Type the Instance Name
- Next, Next, it will lead to Server Configuration
- Click “Use the same account for all SQL Server Services”
- Click OK
- Next
- Click Browse > Advanced > Find Now
- Select Name (RDN) => Choose your username, Click OK
- Click OK
- Type password, OK
- Next, it will lead to “Database Configuration”
- Check “Mixed Mode (SQL Server authentication and windows authentication” to specify administrator (sa) password
- Type password for sa
- Click “Add Current User”
- Next
- Click “Add Current User” again
- Next
- Check “Install the native mode default configuration” radio button
- Many Next
- Install
- After the installation completed successfully, click “Close”

II. Create User Account
- Login to the SQL Server Management Studio :
-> Server name :[instance name]
-> Login : sa
-> Password : [your password for sa]
- Expand “Security” folder and “Logins” folder on the SQL Server Management Studio Object Explorer
- Right Click “Logins” folder >> New Login
- Create user account name on the “Login name:” textfield
- Check SQL Server Authentication radio button >> setup the passwords
- Check the three check box options
- Click Server Roles and determine the roles for the user account by check the check box options
- Click button “OK”

III. Create Database for the User Account
- Right Click “Databases” folder >> New Database
- Create database name on the “Database name:” textfield
- Setup the Owner by click “…” button >> Browse >> Check the user account name >> OK >> OK

IV. Setup Default Database for User Accounts
- Right Click the User Account inside the “Logins” folder explorer >> Properties
- Pick the database default by choose the Dropdownlist on the “Default database:” properties >> OK

Categories: Tips | Tags: , , , , , , | Leave a comment

Attaching .MDF files in to Microsoft SQL Server 2008 R2

Attaching .mdf files in to SQL Server database may be an easy thing for those who are good at Computer Technology area, but sometimes it can be tricky for the beginners.

sql_server_2008_r2

In order to atatch or import the database file (.mdf) we need both .mdf and .ldf files.
Step-by-step process:
I. Attach the database using SQL Server Management Studio GUI
- Log in to the SQL Server Database using Microsoft SQL Server Management Studio
- Right click Databases > Attach..
- Click “Add”
- Find the location of .mdf and .ldf files on the hard drive (I prefer to put the files on the server at C:\Program Files\Microsoft SQL Server\Database Instance Name\MSSQL\Data\)
- Click OK
- Click OK again

Notes : If in this step you found that the name of the database was retrieved from the path location of .mdf file was stored, it means your attachment is not done properly. So we want to detach the database, and re-attach using SQL Syntax

II. Attach the database using SQL Syntax

The SQL Syntax to attach .mdf and .ldf files is:
sql syntax

Categories: Tips | Tags: , , , , | Leave a comment

Halloween is in the Air

Since every body celebrates Halloween with costume party, we can put some spooky flying creatures in our drupal 7 website.

Step-by-step process:

I. Setup Module

-Download “TB Halloween” module at http://drupal.org/project/tb_halloween
- Install and enable the module

II. Setup Blocks

- Go to Structure > Blocks

- Scroll down til you find “Halloween”

- Choose the Region setting on the Halloween drop down list menu

- Hit “Save blocks” button

III. Setup the Spooky Creatures

- Go to Structure > TB Halloween Setting

- Click “Add item” link

- Select the image, animation type, and other properties (I prefer to pick “Path” on the “Animation Type”)

- Hit button “Save”

Categories: Tips | Tags: , , , , | Leave a comment

Embedding Google Map in Drupal 7

I. Setup Module
- Download “Google Map Field” module at
http://drupal.org/project/google_map_field

- Install and enable the module

II. Setup Content Types
- Go to Structure > Content types > Add content type
- Fill out the Add new field label with “Map”
- Select drop down list on the “Field Type” column, then pick “Google Map Field”
- Select “Manage Display” tab
- Select drop down list on the “Label” column.
- Hit Button “Save”
- Hit Button “Save Field Setting”
- Hit “Save settings” button

III. Create Content
- Go to Content > Add content > Map
- Type the “Title”
- Put the cursor on the “Latitude” textfield
- Pick your location on the map.
- Click “Publishing options”, then check “Promoted to front page” checkbox
- Hit button “Save”
- Go to the Home Page Location and click the new content that we have just created, and copy the link location

IV. Setup Menu Link
- Go to Structure > Menus
- Click “add link” on the “Main menu” Operations
- Type the “Menu link title”
- Paste the link location, which we copied on the step III, in to the “Path” textfield
- Choose the Parent link drop down list
- Hit “Save” button
- Go to the Homepage

Your Map link should appear on the Main Menu, and your Map should appear when you click the new link menu

google map

Figure 1: Google map on drupal 7 website

Figure 1 shows us the Google map that has been embedded on the drupal 7 website.

Categories: Tips | Tags: , , , | Leave a comment

Blog at WordPress.com. Theme: Adventure Journal by Contexture International.

Follow

Get every new post delivered to your Inbox.

Join 77 other followers