Archive for March, 2010

Apache and Tomcat via Cpanel – Servlet Display Problems

March 29th, 2010

Problem

Apache Web Server was not passing servlet requests to Apache Tomcat. Instead it served 404 errors, even though the Apache Tomcat Connector (JK 1.2, mod_jk) was auto-configured by the WHM / Cpanel installation.

Other Possible Descriptions of the Problem

  • Jsp’s work in Tomcat, but servlets do not
  • Apache Http Server won’t pass servlet requests to Tomcat
  • Tomcat problems using the Cpanel plugin
  • Virtual host configuration problem with Cpanel Tomcat
  • Apache not recognizing servlets
  • Servlets can’t be accessed through Apache

In the latest Cpanel Release (11.15.0-RELEASE 17853), Tomcat support has been integrated. Prior to this (I’m not sure for how long), Tomcat was available via a beta plug-in. I experienced this problem with both the beta plug-in and the integrated support.

What’s Happening

Apache Http Server accepts all web requests and determines which are requests for static content, and which requests should be forwarded to Tomcat.

Apache correctly serves static content, and correctly passes all requests for .jsp pages to Tomcat. But when a servlet is requested, e.g. www.myserver.com/myapp/myservlet, Apache looks for the “/myapp/myservlet” directory, and finding none, spits out a 404 error.

How to Resolve the Problem

I tried several things that I thought should work but did not, though I don’t know if it was due to my specific configuration or because they were just the wrong things to do. What finally solved the problem was just adding an .htaccess file to the root of the web application with the following lines:

SetHandler jakarta-servlet
SetEnv JK_WORKER_NAME ajp13

This forces Apache to forward all requests to resources within this context to Tomcat for processing, specifically to worker ajp13. Ajp13 is one of the default workers set up, and is defined (on my system) in /usr/local/jakarta/tomcat/conf/workers.properties.

Other things that I thought should work but didn’t (your mileage may vary):

1) In /etc/httpd/conf/jk.conf (if your httpd.conf file includes jk.conf),
add/edit the switch “+ForwardDirectories.” Normally, if Apache runs
across a directory it doesn’t recognize, it will spit out a 404. This
switch says to forward those requests to Tomcat, and let Tomcat spit
out a 404 if it can’t fulfill the request.

2) In /etc/httpd/conf/jk.conf (if your httpd.conf file includes jk.conf), specifically mount each context, and unmount static content. Mounting tells Apache to pass requests to Tomcat, and unmounting tells Apache to serve the content itself. Newer versions of Tomcat are faster than Apache at serving static content, but apparently, using Apache to serve static content is safer from a security perspective.

JkMount /mywebapp/* ajp13
JkUnMount /*.gif ajp13
JkUnMount /*.jpg ajp13

A separate issue that is outside the scope of this post is whether you should use Apache Web Server to front Tomcat requests, or whether you should just have Tomcat accept requests over port 80. If you’re using a recent Tomcat version (5.5+), Tomcat can serve both static and dynamic content faster than Apache.

Use Tomcat if: 1) you’re only dealing with a single server; 2) and you’re not using any other software that requires Apache (e.g. forums or wikis written in PHP).

Use Apache to front Tomcat requests if: 1) you want to load balance across multiple servers; 2) or you want different web applications or virtual hosts to be served by different processes.

Disclaimer

I know embarrassingly little about hardware, networking, or server setup. This solution might be a hack or it might be obvious to some more familiar with the components mentioned, but it couldn’t be resolved through a dedicated server help desk or through the Cpanel help desk, so I assume there are others out there that this could help. Everything in this post is based on my limited experience with the aforementioned software and my own research. If you know of a better, cleaner way to do this, or if you know how better to describe this problem or solution, please forward to me and I’ll amend this post.

Rationale Behind this Post

I recently (as in yesterday) resolved a difficult to diagnose problem involving Cpanel, Apache Web Server, Apache Tomcat, and the Apache Tomcat Connector (JK 1.2, mod_jk2). My googling skills tend to be above average, but I could find no reference to this specific problem anywhere, and the sole purpose of this post is to hopefully save someone else the aggravation. So please disregard the keyword-heavy text — it’s altruistic in nature, I assure you.

What is a Domain Name

March 26th, 2010

The unique name that identifies an Internet site. Domain Names always have 2 or more parts, separated by dots. The part on the left is the most specific, and the part on the right is the most general. A given machine may have more than one Domain Name but a given Domain Name points to only one machine. For example, the domain names:domainnameswebaddress.com mail.domainnameswebaddress.com webhosting.domainnameswebaddress.com can all refer to the same machine, but each domain name can refer to no more than one machine. Usually, all of the machines on a given Network will have the same thing as the right-hand portion of their Domain Names (domainnameswebaddress.com in the examples above). It is also possible for a Domain Name to exist but not be connected to an actual machine. This is often done so that a group or business can have an Internet e-mail address without having to establish a real Internet site. In these cases, some real Internet machine must handle the mail on behalf of the listed Domain Name.

How is e-commerce helpful to the consumer?

March 26th, 2010

In C2B transactions, customers/consumers are given more influence over what and
how products are made and how services are delivered, thereby broadening consumer
choices. E-commerce allows for a faster and more open process, with customers
having greater control.
19
E-commerce makes information on products and the market as a whole readily available
and accessible, and increases price transparency, which enable customers to
make more appropriate purchasing decisions

What is E-Commerce? Featurers of E-Commerce website ?

March 26th, 2010

E-commerce is business in the online environment. Here all transactions, deals take place over the internet.

  • E-commerce websites have to exert an image of vibrancy, competitiveness and efficiency. For that a powerful website builder software has to be selected.
  • The pages have to be search optimized if you want your site to be visible in search engines at a higher position.
  • Integration of the website with PayPal would help accept real-time credit card processing instantly.
  • The templates of the site should be designed professionally and there should be space to accommodate catalogues prepared in Excel.
  • The site has to be integrated with other websites using HTML editor, which involves allotting codes to web pages.

Capabilities of a Content Management System

March 26th, 2010

A WCMS is a software system used to control a dynamic collection of Web material (HTML documents, images and other forms of media). A CMS facilitates document control, auditing, editing, and timeline management. A WCMS typically has  Automated templates

Create standard output templates (usually HTML and XML) that can be automatically applied to new and existing content, allowing the appearance of all content to be changed from one central place.
Easily editable content
Once content is separated from the visual presentation of a site, it usually becomes much easier and quicker to edit and manipulate. Most WCMS software includes WYSIWYG editing tools allowing non-technical individuals to create and edit content.
Scalable feature sets
Most WCMS software includes plug-ins or modules that can be easily installed to extend an existing site’s functionality.
Web standards upgrades
Active WCMS software usually receives regular updates that include new feature sets and keep the system up to current web standards.
Workflow management
Workflow is the process of creating cycles of sequential and parallel tasks that must be accomplished in the CMS. For example, a content creator can submit a story, but it is not published until the copy editor cleans it up and the editor-in-chief approves it.
Delegation
Some CMS software allows for various user groups to have limited privileges over specific content on the website, spreading out the responsibility of content management.[7]
Document management
CMS software may provide a means of managing the life cycle of a document from initial creation time, through revisions, publication, archive, and document destruction.
Content virtualization
CMS software may provide a means of allowing each user to work within a virtual copy of the entire Web site, document set, and/or code base. This enables changes to multiple interdependent resources to be viewed and/or executed in-context prior to submission.
Content syndication
CMS software often assists in content distribution by generating RSS and Atom data feeds to other systems. They may also e-mail users when updates are available as part of the workflow process

8-Tips for Designing a Great Website

March 15th, 2010

8-Tips for Designing a Great Website
Square buttons, round buttons, flashy buttons … will they match my shoes, my handbag or my tie? Are you stuck in a maze of buttons, headings, bullets, sub-headings and colour schemes?

STOP!!!!

Take a deep breath and read some practical tips for professional looking websites.

1. Select a colour scheme and stick to it.

If your company has a logo or preferred colours on its stationery that’s a good start. For those of you starting from scratch, choose two or three complementary colours and stick with them – don’t change colours on every page.

The most common colour schemes include:

- Red, yellow and white
- Blue and white
- Red, grey and white
- Blue, orange and white
- Yellow, grey and white.

If you’re not sure what colour scheme to choose, surf the internet and find a website that you like. You can then model your colour scheme on what already exists.

2. Use templates.

Can’t find a website you really like? Another option is to choose a template. There are many templates or pre-set designs. These come as part of your web design software (such as FrontPage) or you can check out some websites that specialise in designing templates.

Visit:

www.web4business.com.au emplates1.htm
www.newtemps.com
www.website-templates-resale-rights.com
www.123webtemplatesandmore.com

3. Provide an easy to use navigation system.

This is one of the most important issues to consider when designing a website. You need to ensure your visitors can find what they are looking for easily. Most websites either display their navigation bar on the left or at the top. And since most people are used to this type of navigation, it’s best to stick with it.

It also helps to include your navigation bar at the bottom of each page to save your visitors from having to scroll back to the top.

4. Don’t go overboard on special effects

Whilst it is ok to have one or two special effects to jazz up your website, spinning graphics and logos often distract your visitor from the content, not to mention they can take too long to download. Your visitors may click away even before your spinning logo finishes loading.
5. Backgrounds

Ensure your visitors can read the text on the background, ie. no black writing on dark blue background or yellow on white. Also be careful that your links are visible before and after being visited. The default for links in most programs is blue (before being visited) and burgundy (after being visited), so if you have a dark background, ensure your links are light.

6. External Links

It is a good idea to open links to other websites in a new window. That way your visitors can easily return to your site when they are finished browsing the external link

7. Site Map & Search Feature

If you website is more than 15 pages, it is useful to have a site map or a “Search” feature to ensure your visitors can easily find what they’re looking for.

8. Content is King

While it is important that your website looks clean and professional, it is far more important that you concentrate your efforts on the content and promotion.

If you want a professional website, things to stay away from include:

1. Flash intros, revolving globes, bevelled line separators, animated mail boxes
2. Loads of pop up or pop under boxes
3. Autoplay music. Allow your customer to play music only if they choose.
4. Hit counters of the free variety, which say “you are 27th visitor”
5. Date and time stamps, unless your website is updated daily or weekly
6. Busy backgrounds.

Don’t sweat the small stuff and get yourself focussed on what to include on the website and the best way to promote it. We will cover these topics in future articles.

This article is written by Ivana Katz whi is the owner of Websites 4 Small Business – www.web4business.com.au, a company specialising in the design and promotion of small and home-based business websites.

Merits and demerits of shared web hosting

March 10th, 2010

Merits:

1. Cost effective: Due to the fact that many websites are hosted on a single web server, web hosting providers provide economic shared web hosting services. Now-a-days due to cut throat competition in web hosting industry, one can find several web hosting companies offering huge web space and bandwidth with as high as 1000 MB disk space and 40 GB bandwidth.

2. Feasible: Due to the fact that shared hosting web servers are operated, monitored and look after around the clock by IT professionals, who are experts in their respective field, one can concentrate more effectively on his/her web business and the problem of downtime and maintenance will not bother him/her any more.

3. Utility options: In case of shared web hosting, though web resources are shared, utility options are provided by the hosting company so that user can manage his/her website using control panel or similar tools. User is having an option to upload files, modify /remove web pages, add database, check web statistic etc. Not only that, user is also provided facility to create domain name specific e-mails accounts.

4. Efficient: Now-a-days shared web hosting service usually comes with web space and bandwidth that are more than sufficient for small business websites. Efficiency lies in the fact, that in addition to above, one can add more resources and can even overrun the web space or bandwidth usage.

Demerits:

1. Problem with response time: As the web server is shared, websites in the shared web hosting have to face problem of slower server response time as compared to dedicate server hosting.

2. Problem of Reliability: In case of shared web hosting, problem of reliability remains as usually web hosting providers may take care of the security and performance of the shared server but it is also possible that some of websites hosted on the shared server run a nasty program or script or over-utilize the resources, resulting in bringing down the web server. Thus due to fault of one all websites have to suffer downtimes and inaccessibility in case of shared web hosting.

3. Problems related to sharing: As discussed above also, due to fault of one all users have to face the problem for example if there is any one “bad” website in shared web server, due to it all websites on the server can be banned altogether by ISP or search engine due to shared IP address. However it is worth to note that one can always pay extra to get a dedicated IP address to avoid the above problem.

4. Problems related to Security: As many websites shared one server, problem of security always remains in case of shared web hosting as it is quite easy to hack one’s sensitive datas by another on the same server.

Thus in conclusion it can be said that before deciding to deal with shared web hosting, one should consider all the merits and demerits of shared web hosting as highlighted above. One should not forget the success of his/her business depends upon his/her website which in turn depends upon good host provider.

Concept of Shared Web Hosting

March 10th, 2010

If extremely high performance and high bandwidth are not the points in question, then shared web hosting service can be a most convenient and economic way of hosting web sites.. As name implies, in case of shared web hosting service, the web server that hosts the web pages is shared by several other websites. Talking about number of websites on a shared hosting server, they can be in thousands. Now due to the fact that just one server is fulfilling the requirements of many other websites, the plus point is they can offer cheap prices for their server.

As there are so many websites hosted on a single web server, still there is no pint of worry for the user as the web hosting providers will not compromise on any kind of security and performance issues in case of shared hosting servers. Not only that, shared hosting web servers are operated, monitored and look after around the clock by IT professionals, so as to minimize server downtimes.

Shared hosting servers run on UNIX or other multi-user operating system and each website hosted on the web server is provided a separate account in the operating system. These websites hosted on shared servers are provided unique shared IP addresses and are provided with a fix amount of web resources.

Types of hosting

March 10th, 2010
  • Free web hosting service: offered by different companies with limited services, sometimes supported by advertisements, and often limited when compared to paid hosting.
  • Shared web hosting service: one’s website is placed on the same server as many other sites, ranging from a few to hundreds or thousands. Typically, all domains may share a common pool of server resources, such as RAM and the CPU. The features available with this type of service can be quite extensive. A shared website may be hosted with a reseller.
  • Reseller web hosting: allows clients to become web hosts themselves. Resellers could function, for individual domains, under any combination of these listed types of hosting, depending on who they are affiliated with as a provider. Resellers’ accounts may vary tremendously in size: they may have their own virtual dedicated server to a collocated server. Many resellers provide a nearly identical service to their provider’s shared hosting plan and provide the technical support themselves.
  • Virtual Dedicated Server: also known as a Virtual Private Server (VPS), divides server resources into virtual servers, where resources can be allocated in a way that does not directly reflect the underlying hardware. VPS will often be allocated resources based on a one server to many VPSs relationship, however virtualisation may be done for a number of reasons, including the ability to move a VPS container between servers. The users may have root access to their own virtual space. Customers are sometimes responsible for patching and maintaining the server.
  • Dedicated hosting service: the user gets his or her own Web server and gains full control over it (root access for Linux/administrator access for Windows); however, the user typically does not own the server. Another type of Dedicated hosting is Self-Managed or Unmanaged. This is usually the least expensive for Dedicated plans. The user has full administrative access to the box, which means the client is responsible for the security and maintenance of his own dedicated box.
  • Managed hosting service: the user gets his or her own Web server but is not allowed full control over it (root access for Linux/administrator access for Windows); however, they are allowed to manage their data via FTP or other remote management tools. The user is disallowed full control so that the provider can guarantee quality of service by not allowing the user to modify the server or potentially create configuration problems. The user typically does not own the server. The server is leased to the client.
  • Colocation web hosting service: similar to the dedicated web hosting service, but the user owns the colo server; the hosting company provides physical space that the server takes up and takes care of the server. This is the most powerful and expensive type of web hosting service. In most cases, the colocation provider may provide little to no support directly for their client’s machine, providing only the electrical, Internet access, and storage facilities for the server. In most cases for colo, the client would have his own administrator visit the data center on site to do any hardware upgrades or changes.
  • Cloud Hosting: is a new type of hosting platform that allows customers powerful, scalable and reliable hosting based on clustered load-balanced servers and utility billing. Removing single-point of failures and allowing customers to pay for only what they use versus what they could use.
  • Clustered hosting: having multiple servers hosting the same content for better resource utilization. Clustered Servers are a perfect solution for high-availability dedicated hosting, or creating a scalable web hosting solution. A cluster may separate web serving from database hosting capability.
  • Grid hosting: this form of distributed hosting is when a server cluster acts like a grid and is composed of multiple nodes.

What is Web Hosting

March 10th, 2010

Web hosting is an online service that allows organizations and individuals to post a website or web content on the internet. A web hosting service basically houses your website on the internet.

Doteasy web hosting services meet the needs of a variety of users. Whether you want to manage a personal website, or an e-commerce website for a business, we’ve got the perfect web hosting package for you.

All of our web hosting packages include an ample amount of web storage space, data transfer, and email accounts. FTP access also comes standard, and you’ll also get reliable web hosting with a 99.9% uptime!

PHP Freelancer