Friday, September 12, 2008

awstats web site statistics for glassfish

awstats is a open source web server log analyzer. Glassfish is an open source java-based web-server. Click here to check out the statistics on my two glassfish domain servers: domain1 domain2. Of course you will restrict access when you deploy this.

To get the awstats package to work with glassfish:
  1. Download and untar awstats (to /usr/local/awstats)
  2. Follow the instructions for installing awstats and run the configuration utility.
    Remember to create the /etc/awstats/ and /var/lib/awstats/ directories and set write permission.
    Edit the config file (/etc/awstats/yourconfigfilename) and change the LogFile property to:
    LogFile="sed -e 's/"\([0-9\.]*\)"/\1 - -/g' -e 's/"\([^"]*-0800\)"/[\1]/g' /usr/local/java/web/glassfish/domains/domain1/logs/access/server_access_log.%YYYY-0-%MM-0-%DD-0.txt |"
    where "/usr/local/java/web/glassfish" is the location of your glassfish server. Also remember to change the time zone offset (mine is -0800) to your timezome offset.
    Change the DirIcons property to:
    DirIcons="icon"
    You will probably want to change your SiteDomain and HostAliases properties to match your domain name.
    I got this info from Glen Smith's blog, Thanks!
  3. Open your glassfish admin page (http://www.yourserver.com:4848), go to configuration -> http service and click the Access Logging enabled box.
    Click on the Access Log Tab and enter:
    %client.name% %datetime% %request% %status% %response.length% %header.referer% %header.user-agent%
    in the Format text box.
    This makes your log format similar to the apache log format
  4. Go you your awstats/wwwroot directory and create a sub-directory WEB-INF
    Create a web.xml file in this directory that contains:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <servlet>
    <servlet-name>cgi</servlet-name>
    <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>0</param-value>
    </init-param>
    <init-param>
    <param-name>cgiPathPrefix</param-name>
    <param-value>cgi-bin</param-value>
    </init-param>
    <load-on-startup>5</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>cgi</servlet-name>
    <url-pattern>/awstats.pl</url-pattern>
    </servlet-mapping>
    </web-app>
    Afterwards, cd to the wwwroot/cgi-bin directory type chmod a-w *.pl just to be careful.
  5. Now, install this as a web server in the glassfish admin screen (http://www.yourserver.com:4848)
    Applications -> Web Applications -> Deploy
    And deploy the web server directory: /usr/local/awstats/wwwroot. Make sure your context root is awstats.


  6. Try to invoke the servlet as it's described in the awstats documentation:
    http://www.yourdomain.com/awstats/awstats.pl?config=yourconfigfilename
    You should see the awstat config data. Cool!

79 comments:

r2 said...

In the 5th step, I couldn't deploy and I got this error:

Deploying application in domain failed; Error loading deployment descriptors for module [wwwroot]
Line 7 Column 16 -- Deployment descriptor file WEB-INF/web.xml in archive [wwwroot]. cvc-complex-
type.2.4.a: Invalid content was found starting with element 'servlet-class'. One of
'{"http://java.sun.com/xml/ns/j2ee":description, "http://java.sun.com/xml/ns/j2ee":display-name,
"http://java.sun.com/xml/ns/j2ee":icon, "http://java.sun.com/xml/ns/j2ee":servlet-name}' is expected.
Error loading deploy...

Do you know why it happened?

Thanks,

kovalan Jayamurugan said...

Excellent post!!! Java is most popular and efficient programming language available in the market today. It helps developers to create stunning desktop/web applications loaded with stunning functionalities. Best JAVA Training in Chennai | JAVA Course in Chennai

Badrul Jaman said...

Wonderful post..Excellent post, Java is most popular and efficient programming language available in the market today. It helps developers to create stunning desktop/web applications loaded with stunning functionalities.
iOS Training in Chennai | Informatica Training in Chennai

Mohamed Omer said...

Great and impressive article!!


Seo Training in Chennai

Ranjitha M said...

Thanks for your informative sharing....
online marketing courses in chennai

D Entertainment said...

dongtam
mu moi ra hom nay
tim phong tro
http://nhatroso.com/
nhạc sàn
tổng đài tư vấn luật
văn phòng luật hà nội
tổng đài tư vấn luật
thành lập công ty trọn gói
http://we-cooking.com/
chém gió
trung tâm tiếng anh

- Xoẹt xoẹt xọe.

Đột nhiên trên tường thành có mấy đạo thân ảnh nhảy ra sau lưng của Nhạc Thành, chính là những trưởng lão có tu vi Đấu Tôn.

Nhạc Thành nhìn đám người này, tổng cộng có bảy mươi người tất cả, trong đó có những trưởng lão của Hồ Điệp cốc, Vạn Kim Môn, Cuồng Sư môn mà Nhạc Thành biết.

Vừa nghe thấy U Minh tông và Luyện Dược sư công hội sẽ công kích thành, tất cả mọi người đều lộ vẻ lo lắng, đặc biệt là khi biết có cường giả Đấu Thánh.

Tuy nhiên Nhạc Thành cũng không lo lắng, chỉ là một Thanh Ma mà thôi, lần trước Vũ Văn Nam để hắn chạy mất, không ngờ lần này hắn lại xuất hiện ở đây.

- Đến đây đi.

Nhạc Thành nhìn về phía xa xa mà nói, khóe miệng nở ra một nụ cười quỷ dị.

- Đến đây đi, mau đến đây.

Một lát sau nhìn thấy phương gia nghìn dặm chằng chịt thân ảnh, Nhạc Thành cất tiếng nói.

Trên tường thành, chúng đệ tử cũng khẩn trương, nhóm đệ tử

Rohit P said...

great job, very useful information
will try using them
seo can make any article to reach people very effectively
seo is so simple that every one will love to get training on seo seo training in bangalore

Steve Smith said...

Great and Useful Article.

Online Java Training

Online Java Training from India

Online Java Training

Online Java Training From India

Java Training Institutes in Chennai

Java Training in Chennai

Indhu Mathy said...

Awesome blog for java technolgy its very useful for java trainers.
Regards,
iOS Training in Chennai | Multimedia Training in Chennai | QTP Training in Chennai | Informatica Training in Chennai | CCNA Training in Chennai | Java Training in Chennai | Oracle Training in Chennai | Android Training in Chennai

Savitha said...

Really awesome blog. Your blog is really useful for me.
Thanks for sharing this informative blog. Keep update your blog.
Oracle Training In Chennai

Diya Patel said...

Best iOS Training Institute In Chennai It’s too informative blog and I am getting conglomerations of info’s about Oracle interview questions and answer .Thanks for sharing, I would like to see your updates regularly so keep blogging.

for IT the said...

Java Articles | IT Technical Articles | Dot Net Framework Articles |
JavaScript Articles | Java Training Institutes | Single Page Application Development

Addison adolf said...

We are offering website, website design, e-commerce website and much more......

Buzz Application

Gopi Perumal said...

This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..

Regards,
CCNA Training in Chennai | CCNA Training Institute in Chennai | Best CCNA Training in Chennai

Jeanne Davies said...

Excellent post and wonderful blog, I really like this type of interesting articles keep it you.Android Applications Development

Nikshitha S said...


Very informative content. Digital marketing is one of the best marketing strategy through which we can promote our product or service. In digital marketing we mainly focus on SEO and SMO. The main task involved is to analyse the keyword and to bring the website at top position for the specific keyword.
digital marketing course in chennai | Digital Marketing training in chennai

Nicky Paul said...

A phone call is a phone bring in which somebody converses with a few individuals in the meantime. The phone calls might be intended to permit the called gathering to take part amid the call, or the ring might be set so that the called party simply listens into the call and can't talk. It is now and again called ATC (sound video chat).
Conference Call

Melisa said...

Nice information about the load testing!!! I prefer Loadrunner automation testing tool to validate the performance of software application/system under actual load. Loadrunner Training in Chennai | Loadrunner training institute in Chennai|Qtp training in Chennai|Best qtp training institute in Chennai

Jeanne Davies said...

Nice impressive info about website designing and also Android applications Live Updates

Nicky Paul said...

MarketPress sets the standard for WordPress eCommerce arrangements, giving an exquisite shopping background that backings all real installment passages and permits you to effortlessly oversee dissemination and shopping costs with custom transportation alternatives.
Wordpress Online Shop And Plugins Store

Kayal Vizhi said...

Nice post. Thanks for sharing.

Digital Marketing Services in Chennai

Regina Hilary said...


The war between humans, orcs and elves continues earn to die . Lead your race through a series of epic battles, using your crossbow to fend off foes and sending out units to destroy castleshappy wheels . Researching and upgrading wisely will be crucial to your success! There are 5 ages total and each one will bring you new units to train to fight in the war for you cause.
earn to die 2
Whatever you do, don’t neglect your home base because you cannot repair it and once it is destroyed, you lose! Age of War is the first game of the series and really sets the tone for the Age of War games . Also try out the Age of Defense series as it is pretty similar.
In this game, you start at the cavern men’s age, then evolvetank trouble ! There is a total of 5 ages, each with its units and turrets. Take control of 16 different units and 15 different turrets to defend your base and destroy your enemy.
The goal of the game also differs depending on the level. In most levels the goal is to reach a finish line or to collect tokens. Many levels feature alternate or nonexistent goals for the player.

Balarishi said...

Good post. Thanks for sharing.

SEO Training in Chennai

Regina Rj said...

Informative post, Thanks for sharing.

digital marketing training in chennai

Priya said...

Very useful content thanks for sharing such a informative content which provided me the required information on the various technology.
AngularJS Training in Chennai | AngularJS course in Chennai

Nikshitha S said...

Very interesting content which helps me to get the indepth knowledge about the technology. To know more detils about the course visit this website.
Spring training in Chennai | Best Spring training institute in Chennai

mythily mythu said...

nice.....
spring training in chennai

mythily mythu said...

good......
Angularjs training in chennai

for IT the said...

Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training

Hibernate Online Training Hibernate Online Training Spring Online Training Spring Online Training Spring Batch Training Online Spring Batch Training Online

for IT the said...

Java Training Institutes Java Training Institutes Java EE Training in Chennai Java EE Training in Chennai Java Spring Hibernate Training Institutes in Chennai J2EE Training Institutes in Chennai J2EE Training Institutes in Chennai Core Java Training Institutes in Chennai Core Java Training Institutes in Chennai

jhansi joe said...


Loadrunner is a flagship automation load testing product from HP. This products command over 70 % of market share in load and performance testing tools. Nowadays, testing professionals strong in handling Loadrunner automation tool has huge career opportunity.
Loadrunner Training in Chennai

Paul Miller said...


This technical post helps me to improve my skills set, thanks for this wonder article I expect your upcoming blog, so keep sharing...

Selenium Training in Chennai|Selenium Training

Rasool Bevi said...

The future of software testing is on positive note. It offers huge career prospects for talented professionals to be skilled software testers.
Regards,
Software testing training in Chennai| Best software testing training institute in Chennai|<

charles said...

Thanks dear for the articles…. Really helpful for me and it’s according to the purpose.
seo service

for IT the said...

I have read your blog its very attractive and impressive. I like it your blog.


Internet Marketing Company Digital Marketing Agency

SEO Company in India SEO Services in India

Digital Marketing Company in Chennai

Jeorge Bush said...

Keep it up!! You have done the nice job having provided the latest information.Shavers

Mehgna Sharma said...

Nice post Thanks for the Sharing this information Big Data Hadoop Training | PHP Training in Noida

MANIKANDAN R said...

Nice to read this article.... Thanks for sharing.....
digital marketing courses in chennai

E-Search Advisors Chennai said...

Nice Post. Thanks for sharing this useful information.
SEO Training In Chennai
SEO Training Institute In Chennai

sri krishna kumar said...

You've made some good points there. I looked on the internet for more information about this
Mainframe Training In Chennai | Hadoop Training In Chennai | ETL Testing Training In Chennai

impress bss said...

Thank you for sharing valuable information
Mobile app training institue in chennai
Web designand developemnt training institue in chennai
Digital Marketing training institue in chennai

nivatha said...

The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
Data science training in velachery
Data science training in kalyan nagar
Data Science training in OMR
Data Science training in anna nagar
Data Science training in chennai
Data Science training in marathahalli
Data Science training in BTM layout
Data Science training in rajaji nagar

Ram priya said...

Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
Devops training in Chennai
Devops training in Bangalore
Devops training in Pune
Devops Online training
Devops training in Pune
Devops training in Bangalore
Devops training in tambaram

suresh ravi said...

The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.

ccna training in chennai



ccna training in bangalore


ccna training in pune

simbu said...

Just stumbled across your blog and was instantly amazed with all the useful information that is on it. Great post, just what i was looking for and i am looking forward to reading your other posts soon!

java training in chennai | java training in bangalore

java online training | java training in pune

selenium training in chennai

selenium training in bangalore

genga g said...
This comment has been removed by the author.
sathya shri said...


I would like to thank you for your nicely written post, its informative and your writing style encouraged me to read it till end. Thanks

angularjs-Training in annanagar

angularjs Training in chennai

angularjs Training in chennai

angularjs Training in bangalore

Gilbert syn said...

The instruction of automation you have sharing on this post is very much helpful to develop new intention.

GST coaching center in chennai | GST training institute in chennai| GST certification course in chennai| accounts and taxation course in chennai|Accounts training in chennai

Mouni yoga said...

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.
python training in velachery
python training institute in chennai

shethal said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.

Devops Training in pune
DevOps online Training

sweety ganga said...

Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
angularjs online Training

angularjs Training in marathahalli

angularjs interview questions and answers

angularjs Training in bangalore

angularjs Training in bangalore

angularjs Training in chennai

Dwarakesh babu said...

Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.



AWS Training in Bangalore | Amazon Web Services Training in Bangalore


AWS Training in Bangalore |Best AWS Training Institute in BTM ,Marathahalli


AWS Training in Rajaji Nagar | Amazon Web Services Training in Rajaji Nagar

AWS Training in Chennai |Best Amazon Web Services Training in Chennai

Bee Yes said...

Amazing Article ! I have bookmarked this article page as i received good information from this. All the best for the upcoming articles. I will be waiting for your new articles. Thank You ! Kindly Visit Us @ Coimbatore Travels | Ooty Travels | Coimbatore Airport Taxi

Balaji said...

Hope Tutors provides the best AWS Training in Chennai at affordable fees.

gowthunan said...

Appreciating the persistence, you put into your blog and detailed information you provide.
safety course in chennai

Divya M said...

I am really happy with your blog because your article is very unique and powerful for new reader.
Click here:
selenium training in chennai
selenium training in bangalore
selenium training in Pune
selenium training in pune
Selenium Online Training

mathimathi said...

Another beauty!!! I get so inspired by your artwork!!
Angularjs Training in Chennai |
Angularjs Training |
Angularjs course in Chennai

mathimathi said...

What a cute sign! You've made a lot of them. It's great that you can make them yourself and don't have to buy them from someone else.
QTP Training in Chennai |
QTP Training |
QTP Training Institutes in Chennai

Bee Yes said...

Amazing Article ! I have bookmarked this article page as i received good information from this. All the best for the upcoming articles. I will be waiting for your new articles. Thank You ! Kindly Visit Us @ Coimbatore Travels | Ooty Travels | Coimbatore Airport Taxi

simbu said...

hank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me 

Java training in Chennai | Java training in Annanagar

Java training in Chennai | Java training institute in Chennai | Java course in Chennai

Java training in Chennai | Java training institute in Chennai | Java course in Chennai

Java training in Bangalore | Java training in Electronic city

Naga Manickam said...

Nice post. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated posts…
Data Science course in Indira nagar
Data Science course in marathahalli
Data Science Interview questions and answers
Data science training in tambaram | Data Science Course in Chennai
Data Science course in btm layout | Data Science training in Bangalore
Data science course in kalyan nagar | Data Science Course in Bangalore

Saro said...

This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.

best rpa training in chennai
rpa training in chennai |
rpa online training
rpa course in bangalore
rpa training in pune
rpa interview questions and answers | blueprism interview questions and answers

thulasi ragini said...

Thanks for your informative article, Your post helped me to understand the future and career prospects & Keep on updating your blog with such awesome article.
python course institute in bangalore
python Course in bangalore
python training institute in bangalore

johnsy sai said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
excel advanced excel training in bangalore | Devops Training in Chennai

sathya shri said...

Nice tutorial. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated tutorials…
angularjs Training in bangalore

angularjs Training in bangalore

angularjs Training in btm

angularjs Training in electronic-city

angularjs online Training

angularjs Training in marathahalli

Anbarasan14 said...

Thanks for sharing these effective tips. It was very helpful for me.

IELTS Institute in Mumbai
Best IELTS Coaching Classes in Mumbai
IELTS Coaching Center in Mumbai
Best IELTS Classes in Mumbai
IELTS Coaching near me
IELTS Course in Mumbai
IELTS Training Institute in Mumbai

akshaya raja said...

This is really too useful and have more ideas and keep sharing many techniques. Eagerly waiting for your new blog keep doing more.
cloud computing training institutes in bangalore
best cloud computing training in bangalore
cloud computing certification in bangalore
cloud computing classes in bangalore
best cloud computing training institutes in bangalore

vijay antony said...

I am really happy with your blog because your article is very unique and powerful for new reader.
Click here:
selenium training in chennai | selenium course in chennai
selenium training in bangalore | selenium course in bangalore
selenium training in Pune | selenium course in pune | selenium class in pune
selenium training in Pune | selenium course in pune | selenium class in pune
selenium online training | selenium training online | online training on selenium

Sadhana Rathore said...

This is a great article, it gave lots of information. It is extremely helpful for all. Keep sharing.
ccna Training in Chennai
ccna Training near me
ccna course in Chennai
ccna Training institute in Chennai
ccna institute in Chennai
ccna Training center in Chennai

dinesh said...

I am really enjoying reading your well written articles.
It looks like you spend a lot of effort and time on your blog.Keep Doing.
Digital Marketing Training in Bangalore
Digital Darketing Courses in Bangalore
Best Digital Marketing Courses in Bangalore
Digital Marketing Institute in Bangalore
Devops Training in Bangalore
Devops Training Institutes in Bangalore

Gautam krish said...

Really great blog… Thanks for your useful information.
Spoken English Class in Coimbatore
Best Spoken English Classes in Coimbatore
Spoken English in Coimbatore
Spoken English Institute
Spoken English Training Institute

Hemapriya said...

The blog you have posted is outstanding. Thanks for your information.
Android Training Institute in Coimbatore
Android Training and Placement in Coimbatore
Android Development Training in Coimbatore
Best Android Training Institute in Coimbatore
Advanced Android Training

Aruna Ram said...

Your Post is very interesting, i got more information from your post. Thanks for your great ideas. kindly keep it.....
Certified Ethical Hacking Course in Bangalore
Ethical Hacking Certification in Bangalore
Learn Ethical Hacking in Bangalore
Ethical Hacking Course in Annanagar
Ethical Hacking Training in Perambur
Ethical Hacking Training in Nungambakkam
Ethical Hacking Course in Saidapet

Ananya Krishnan said...

Good job in presenting the correct content with the clear explanation. The content looks real with valid information. Good Work

DevOps is currently a popular model currently organizations all over the world moving towards to it. Your post gave a clear idea about knowing the DevOps model and its importance.

Good to learn about DevOps at this time.


devops training in chennai | devops training in chennai with placement | devops training in chennai omr | devops training in velachery | devops training in chennai tambaram | devops institutes in chennai | devops certification in chennai | trending technologies list 2018

Safety Professionals said...

I’m bookmarking and will be tweeting this to my followers! Wonderful blog and amazing design and style.
nebosh course in chennai

Riya Raj said...

The information you have shared is more useful to us. Thanks for your blog.
List of Franchise Business in India
Franchise Opportunities in India with Low Investment
Best Franchise Business in India
Frenchies in India
Top Franchise in
India


nanadhini chandran said...

Brilliant ideas that you have share with us.It is really help me lot and i hope it will help others also.update more different ideas with us.
vmware Training in Thirumangalam
vmware training near me
vmware Training in Vadapalani
vmware Training in Amjikarai

Vicky Ram said...

Really amazing information!!! Thanks for your blog.

startupsdb
Education

Deepika Analy said...

This blog is the general information for the future. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.

Cloud Training in Chennai
Software Testing Training in Chennai
Oracle DBA Trainingin Chennai
Angular Training in Chennai