After you Apache 2 installed correctly, you can tried to open on your browser, if you default server has run. Next step is added Virtual Host on your current server. Check out for running multiple site in one single IP Address
# Ensure that Apache listens on port 80 Listen 80 # Listen for virtual host requests on all IP addresses NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /www/www.jauhari.net ServerName www.jauhari.net <Directory /www/www.jauhari.net> Options FollowSymLinks AllowOverride None Order deny,allow Allow from all </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot /www/nurudin.jauhari.net ServerName www.jauhari.net <Directory /www/nurudin.jauhari.net> Options FollowSymLinks AllowOverride None Order deny,allow Allow from all </Directory> </VirtualHost>
That’s simple method with tiny configuration, on our example, we create two virtual host, one for www.jauhari.net and the other nurudin.jauhari.net, you can save this configuration on your apache2.conf in /etc/apache2/apache2.conf put this code in the end of code, and reboot you Apache2 using this command
sudo apache2ctl restart
If you didn’t find any error, you can check on your server in web browser each site that has created. This is only simple tutorial, you can enhanced this by separated virtual host configuration in different folder and many more. I hope we can explain it later.
Image from here
This is me Nurudin Jauhari. Just human like you, I come from Gunungkidul, small place at Yogyakarta, and Today I live at Malang I was born 30/04/1980 in Ponjong, small village in Gunungkidul, Almost my time in 1 – 15 Years stay at this Village. More
Related posts:
SWF & FLV Player PRO is a smart Flash Player, enriched with numerous options and controls for viewing and managing Flash movies and videos. One of the main benefits of SWF & FLV Player PRO is the ability to save Flash Animation from the web directly to your computer. So if you want to download and save your favorite videos from such sites as Youtube, Matacafe, Google Video or other, SWF & FLV Player by Eltima is just what you need.
More than that, with SWF & FLV Player PRO you can make a screenshot of the favorite moment and even convert the whole movie into the series of screenshots.

Last but not least, SWF & FLV Player PRO allows playback of SWF/FLV files in full-screen mode and feel yourself at cinema while being at home with your cup of coffee.
Congratulations to all the winners from SmashingApps.Com. All of the winners will be contacted. If you are not winner at this time so please be patient and keep visiting here or subscribe to our rss feed, you can follow us on twitter and do not forget to become our fan on facebook as well. because we are coming up with another new great contest earlier next week.
Thanks to Eltima Software for sponsoring this wonderful contest at Smashing Apps.
If you want to conduct any contest at Smashing Apps just contact us and send us all the details.
Brought To You By

Do you want to advertise here? Click to get more info…
Affiliate business was first introduced by amazon.com by giving the marketing team to advertise its products. Since that time many emerging companies that use this system. This highly effective marketing techniques to increase sales because the company’s marketing team to be thousands and even millions of times with minimal cost because it does not pay monthly marketing team. Companies only provide incentives for sales that they do as a commission.
A unique example of what I want to give is about the Hotel Affiliation. This was quite interesting to discuss because they relate to services. Manufacturing companies typically only provide this service, but if engaged in the service have a slightly different calculation. Usually given as a sales commission, if the business service can be done on a per leads. That means every time the customer utilizing the services of the marketer’s company will get a commission for its services already rendered. An affiliate marketer if you get a lot of this kind, it will produce exceptional passive income.
Suggestion for beginner Internet Marketer :
I’m a blogger and content Writer. My work with PHP, Delphi, MySQL, MsSQL, and I really love games and gadget.
Related posts:
SWF & FLV Player PRO is a smart Flash Player, enriched with numerous options and controls for viewing and managing Flash movies and videos.
One of the main benefits of SWF & FLV Player PRO is the ability to save Flash Animation from the web directly to your computer. So if you want to download and save your favorite videos from such sites as Youtube, Matacafe, Google Video or other, SWF & FLV Player by Eltima is just what you need.
When downloading SWF animation SWF & FLV Player PRO allows you to preview all the external resources your file may be using ( it may open and play other SWF or FLV files, load images, etc).After looking into them you can either download initial SWF file, or SWF file with all its external resources, or just external file you liked.
More than that, with SWF & FLV Player PRO you can make a screenshot of the favorite moment and even convert the whole movie into the series of screenshots.

Last but not least, SWF & FLV Player PRO allows playback of SWF/FLV files in full-screen mode and feel yourself at cinema while being at home with your cup of coffee.
This contest will run from April 20, 2010 to April 27, 2010 and we will select the winners randomly by running MySQL query. Result can be announced any day before April 30, 2010 so keep visiting here or subscribe to our rss feed to get the latest updates. To participate in the contest and win free license of SWF & FLV Player PRO, All you have to do is just :
1. Just leave a comment to tell us why you like SWF & FLV Player.
2. Use valid email ID in the email box.
3. Not necessary, but you can subscribe to our rss feed and follow us on twitter and do not forget to become our fan on facebook as well. (To track this contest and for future updates)
4. And thats it!
So what are you waiting for now? Let’s participate in the contest and good luck!
Brought To You By

Do you want to advertise here? Click to get more info…
I’ve just upgrade my personal blog into WordPress 2.9.2 this morning. There are some critical issue update beside vulnerability bug fixed. I think it’s very useful when the website has many writer content like this blog for example. The critical issue is WordPress fixing Trash facility that already launch in previous version WordPress 2.9.
At the first released of Trash facility all user can see the trash even that was not their own trash post. So, it might could be deleted by other user or something else to do. Beside this trash problem there are other bug fixed that will decrease the security problems and make this WordPress CMS more powerful.
So, by upgrading into WordPress 2.9.2 we can manage our blog/website become better and better. I hope Jauhari will upgrade this blog soon.
I’m a blogger and content Writer. My work with PHP, Delphi, MySQL, MsSQL, and I really love games and gadget.
Today, many web hosting accounts use ?CPanel? as an interface that is used by a webmaster for managing the files on the domain. And within this control panel, there is an icon known as ?Fantastico?. This is a service that many web hosts subscribe to and this service allows the webmasters to automatically perform script installation for new scripts without a usual mySQL database creation, file uploading, installation and configuration.
Let’s understand the whole process from a closer look.
Script installation by ?Fantastico? includes Blogs, customer support, content management systems (cms), discussion board scripts (bulletin boards), ecommerce scripts, mailing list scripts and more. Some of you may be familiar with this that they usually require a mySQL database in order to function properly. Also they have frequent updates needed to be installed. And these updates are generally used to fix bugs, security holes or are program upgrades.
In Fantastico, there are no warnings that one should manually back up the mySQL database and other files prior installing any upgrade. And, if you fail to back up everything before you upgrade, it means that you cannot restore the files when things go wrong. Sometimes, you may have an upgrade mess that it will require you to restore the site from the backups.
When you use the automatic installer, you may not have the username and password used for the mySQL database. Actually, with some scripts, one needs the database name, database username and database password in order to reinstall the script and then restoring the data from the backup. And in case, one does not have this information, they need to backup a copy of the mySQL, so that they can import the old database backup after a new install of the script again.
And, if you ever decide to leave the current host for an another web host, it will need your back up of the database and scripts along with the usernames and passwords, so that they script works without any need for a new install on the new web host.
So, you could either learn abut the script installer process and complete the installation on your own and then record the information somewhere safe or you can use the automatic script installer under the icon ?Script Library’ inside the C-Panel. It will allow you to determine what the database name, username and password should be.
Whatever you choose, but always do regular backups of the scripts, files and your databases, you will stay protected.
Problem Description:
In many cases when web user or blog admin can receive the message that “403 Forbeiiden error – You are not authorized to view this page”. I have search for the solutiona and provided my best here:
Possible Solutions:
If your account is hosted on a Windows server it could be a problem with the Directory Indexes. The default configuration of the server is to load index.htm, index.html, default.htm, default.html, default.asp files at highest priority.
WordPress is done in PHP so the default page is index.php. Now this is not part of the default configuration so we need to add it in directory indes and gie it a highest priority to load at first.
You can do it either from the hosting control panel web site settings derectory indexing option or you can contact web hosting service provider.
Thanks,
Shane G.
Related posts:
Related posts:
Related posts:
We want to bring Ruby on Rails closer to those who want to take a peek first, without going through an entire tutorial. So, this article is structured a little different from most other introductions out there; hopefully it is more useful because of this.
I assume you’re already familiar with some other form of Web development, whether PHP, Python, Perl or Java, and relational databases like MySQL. First, we’ll introduce Rails and Ruby and the basic ideas behind both. I’ll teach you just enough Ruby so that you understand the code samples. I’ll tell you how to get Ruby on Rails running on your computer, and I’ll give you an overview of the basic functionality of Rails and demonstrate how Rails’ main parts work together.
This tutorial consists of two articles: in the current, first article we get started with some basic concepts and essential components of Ruby on Rails. In the second part (it will be published next week) you will learn how to install the engine; you’ll also take a closer look at Rails’ inner workings and discover main advantages of Ruby on Rails. Please stay tuned.
After reading these parts, you should have an idea of whether Rails is for you. If you get the feeling that it is, I’ll point you to some good tutorials on the Web that you can use to learn Rails. I’ll also provide a lot of further reading recommendations so you can dig as deep into the topic as you like.
I’m taking this approach because Rails is almost 5 years old now and has become very complex. There are a lot of “Create-your-own-blog-in-5-minutes”-type tutorials out there already, and rather than adding another one, I wanted to provide this kind of rough overview to help you decide whether to take this adventure.
You may want to take a look at the following related posts:

Ruby on Rails was created by David Heinemeier Hansson as a kind of byproduct of Basecamp’s development at 37signals in 2004. Basecamp was built in Ruby because Hansson found PHP and Java not powerful or flexible enough. It was quite an obscure language back then, without the large eco-system available today. To make development easier, Hansson rolled his own Web development framework, based on simple ideas that had proven successful elsewhere. Rails is founded on pragmatism and established paradigms instead of exotic new ideas. And that’s what made it so successful.
Rails is based on the Model-View-Controller pattern that splits your application into three parts:

Rails is “opinionated software.” It doesn’t want to be everything for everyone. It focuses on one way of doing things and streamlines all its parts around that way. That’s not to say there’s no possibility of doing things differently if you need to, but you’ll definitely have it easier if you do things “the Rails way.” And that way happened to be exactly the right one not only for Hansson but for a lot of other developers, too, another important reason for Rails’ success.
Programmer productivity was the main goal during Rails’ development, not performance. This has led to a lot of controversy and claims that arise over and over about how Rails can’t scale. This is Rails’ own fault to a certain degree. In its early days, it had the image of a Web development framework messiah of hope and wonder that would lead us all to the promised land were applications wrote themselves. The Rails team didn’t do enough to keep expectations more realistic, and some people became disappointed.
While it’s true that Ruby on Rails is slower than comparable stacks on PHP or Python, it certainly does scale, as hundreds of successful deployments are proving. You’ll just need to scale sooner and put some thought into it. Remember also that Ruby’s current default implementation is terribly inefficient, but alternatives are on the way. There’s nothing inherently slow about the language, though, as blazing-fast implementations of Smalltalk (a language very similar to Ruby) prove. Ruby will only get faster. As the saying goes, you don’t have a performance problem until you have a performance problem, and all this talk should not scare you yet. You haven’t even started.
Now, before I introduce you to the framework, let’s get started with Ruby.

Ruby on Rails owes not only half its name but its entire feel and flexibility to “Ruby,” that neat little language from Japan.
Ruby came out in 1995 and was developed by Yukihiro Matsumoto, or “Matz” as he’s called in the community. Version 1.0 was released in 1999 and slowly gained recognition in the west from then on.
A key point in the spread of Ruby was the release of “Programming Ruby,” also called the “Pickaxe” (a reference to its cover illustration), by the Pragmatic Programmers. “Programming Ruby” was the first comprehensive English guide to the language and API.
Ruby was designed with simple principles in mind. Matz took the most successful and powerful elements from his favorite programming languages — Perl, Smalltak and Lisp — and combined them into one language with easy syntax. One goal was to make Ruby feel “natural, not simple” and to create a language “that was more powerful than Perl, and more object-oriented than Python.” This results in Ruby’s core principle: Everything is an object.
Let’s stop here and examine this. Really, everything is an object in Ruby. True and false are objects, literals are objects, classes are objects. You can call a method on a numeric literal:
>> 5.next => 6
Operators in Ruby are nothing but methods:
>> 5 * 10 => 50 >> 5.*(10) # times-operator called as a method (dot-notation) => 50 # with a parameter (in parentheses)
Ruby is extremely flexible and open. Almost everything about it can be changed or manipulated at runtime:
String and Integer!Here’s an example:
>> "hi".repeat(4) NoMethodError: undefined method `repeat' for "hi":String >> class String # Open the string class and add the method >> def repeat(i) >> self * i >> end >> end => nil >> "hi".repeat(4) # Call it again on a fresh String literal => "hihihihi" # And there it is!
Here, I defined the method repeat on the String core class, and it was immediately available on a string literal.
And he who giveth, taketh away:
>> class String # Open up the method again >> undef_method :repeat # And remove the method >> end => String >> "hi".repeat(4) # Try to call it NoMethodError: undefined method `repeat' for "hi":String
I could have also done this with predefined methods. They are no more “special” than the methods we have defined.
Let’s review the definition of repeat in the above example for some more interesting tidbits. Note that we’re not saying return anywhere in the body. That is because in Ruby, methods always implicitly return the value of their last expression. You could of course always jump out of a method by using return before reaching the last statement, but you don’t have to. The expression we’re returning is self * i. Self is equal to this in Java and $this in PHP and always refers to the current object. The times-operator on a string repeats the string as often as told by the second operand/parameter, i in this case.
You rarely see manual iterations in Ruby, like for or while loops. Instead, Collections come with their own iterators that you can pass blocks to, which are executed for every element in the collection:
a = "Hey "
[1, 2, 3].each do |num|
puts a * num
end
# Outputs:
# Hey
# Hey Hey
# Hey Hey Hey
What you see here is an array literal containing numbers. On that array, the each method is called, an iterator that takes a block and calls the block for every element in the array. The block starts with the do, followed by a list of its parameters enclosed in pipe symbols. Here we have one parameter called num that will take on the value of the array element in each iteration. Inside the block, we’re simply outputting the result of a * num. The definition of * on Strings is to repeat the string accordingly. We could have put the String inside the Block, but I wanted to demonstrate that blocks have access to their surrounding scope.
Ruby likes to keep the syntax clean and friendly. You can see this in the above examples. Although heavily influenced by Perl, Ruby doesn’t have Perl’s excessive use of special characters. You can use semicolons to end lines, but you don’t have to (and no Ruby programmer does). You don’t need to surround method parameters with braces in unambiguous situations (although it is recommended you do so if they enhance readability), and you especially don’t need to provide empty braces around an empty parameter list. That’s what makes accessors look so much like native properties.
Blocks are framed by do and end. You should only use equivalent curly braces if your blocks don’t span several lines. The only significant use of special characters is found at variable declaration. Variables in Ruby are prefixed with special characters to indicate their scope. Variables starting with a lowercase letter are local variables. Variables starting with an uppercase letter are constants. (This means that all classes are constants, too, since classes start with uppercase letters.) Instance variables start with an @. Class variables that are shared among all instances of a class start with @@. Finally, global variables all start with a $.
You’ll often find methods ending in ? or !. These are not special characters. It is merely conventional in Ruby to use question marks for methods that query an object for a Boolean condition, like Array#empty?, or exclamation marks for methods that are destructible:
>> a = [5, 1, 9, 2, 7] # Create an array and store it in a => [5, 1, 9, 2, 7] >> a.sort # sort merely returns a new, sorted array => [1, 2, 5, 7, 9] >> a => [5, 1, 9, 2, 7] # a still is in its original order >> a.sort! # sort! instead sorts the original array => [1, 2, 5, 7, 9] >> a => [1, 2, 5, 7, 9] # a was changed
Conditionals in Ruby are very similar to other programming languages, with two notable exceptions. First, it’s possible to put a conditional after the statement it protects to make the code more readable:
execute_dangerous_operation() if user.is_authorized? # is equal to if user.is_authorized? execute_dangerous_operation() end
Secondly, Ruby has not only an if but an unless. This is a syntactic nicety for when you want to check for the absence of a condition in a more readable manner:
unless user.is_admin? user.delete else raise "Can't delete admins" end
Sometimes you’ll see names starting with a : (colon). These are a very special feature of Ruby called symbols. Symbols can be used to index hashes or mark states in a variable like you would with an ENUM in C. They are very similar to Strings but also very different. The point about symbols is that they don’t really occupy space in memory, and the same symbol literal always resolves to the exact same symbol:
>> "a".object_id # object_id returns Ruby's internal identifier for an object => 3477510 >> "a".object_id => 3475550 # a new object on the heap >> :a.object_id => 184178 >> :a.object_id => 184178 # the same literal refers to the exact same Symbol object
You’ll find them very often as parameters to methods, where they indicate how a method should work,
User.find(:all) #find all users User.find(:first) #find the first user
or as pointers to methods and variables (see the undef_method example in the “Objects” paragraph above).
Ruby supports single inheritance only, but for added flexibility it supports a feature called Mixins. In Ruby, it’s possible to define Modules that contain Methods and constants and to include these modules in a class via the include method. This way, you can extend the functionality of a class very easily.
Many of Ruby’s core classes even use this mechanism.Array and Hash, for example, both include the Enumerable module to provide a lot of convenience methods for iterating over their contents.
Often, Modules pose certain requirements to classes that include them. The Enumerable Module, for example, requires classes to provide at least an each method and an implementation of <=>, too, if its sorting features are to be used.
Modules also serve other purposes. Most importantly, they can be used to organize code into namespaces. Because classes are constants (which means you can’t assign another class to the same name), they can be stored in modules. These modules can then be nested to form namespaces.
These paragraphs probably won’t enable you to write Ruby programs, but you should be able to understand the code samples in this article now. If you want to explore Ruby a little, try the great interactive tutorial at Try Ruby, or take a peek at one of the books listed at the end of this article. If you just want to see some more code samples, check out the Wikipedia page on Ruby.
In the second part of this tutorial we will get rolling with Ruby on Rails, install the engine, take a closer look at Rails’ inner workings and discover main advantages of Ruby on Rails. Please stay tuned.
You may want to take a look at the following related posts:
Jan Varwig is a programming language enthusiast, currently writing his CS diploma thesis about server-side JavaScript, and a software developer with 10 years of experience working for 9elements and as an independent freelancer. His blog and CV can be found at jan.varwig.org.
(al)
© Jan Varwig for Smashing Magazine, 2009. |
Permalink |
9 comments |
Add to del.icio.us | Digg this | Stumble on StumbleUpon! | Tweet it! | Submit to Reddit | Forum Smashing Magazine
Post tags: coding, programming, rails, ror, ruby