Tag Archives: Tips

Configuring AWStats on Ubuntu Server

Last nite I sat down and configured AWStats on my Ubuntu 7.10 server. I had previously been using statcounter, a free stat service, but I had noticed that it was one of the causes of slowdown on my page loads. Having to access an external site and javascript wasn’t helping. I also run the server so I have full access to the server logs, why not just use those directly.

So far I am really happy with AWStats. It appears to be running properly and pulling in a lot more data than statcounter ever did. It actually is showing me that I had much more traffic than I thought. I had mentioned 5,000 the other day, which I have long since surpassed based on AWStats output.

I’d like to share the steps I took for installing and configuring AWStats on my Ubuntu Server.


Ubuntu has the AWStats package available in the repositories, which we can install with:

sudo aptitude install awstats

This will install the basic files, but there is still a bit of configuring to do, so we’ll dive into that next.

Auto Configuration

From the tutorials that I found elsewhere in my searching there is a awstats_configure.pl file that will try to configure it for you. I did not use this personally, but if you’d like to try it you can run:

sudo perl /usr/share/doc/awstats/examples/awstats_configure.pl

The rest of this tutorial will discuss manual configuration, but if anyone can offer feedback concerning the configure script I’m sure many would be interested.

Manual Configuration

I configured my system manually, which I will outline below. The only requirements here are that you have access to the apache2 logs, or that you have custom log locations for each of your virtual domains (if used). For more information on custom log locations for virtual domains see my previous post, Configuring Virtual Hosting on Ubuntu with Apache2.

The first step is creating an awstats.conf file for your domain. This can be done by moving or copying the /etc/awstats.conf, and giving it a more unique name:

sudo cp /etc/awstats/awstats.conf /etc/awstats/awstats.domain.tld.conf

I created a unique file, using the syntax awstats + domain.tld + conf for each of the domains hosted on my server. Each of these also has their own unique log file as well.

We’ll then edit our new /etc/awstats with custom values for that domain. The main points you’ll want to look for within this file:

  • LogFile=”/path/to/your/domain/access.log”
  • LogFormat=1 (this will give you more detailed stats)
  • SiteDomain=”domain.tld”
  • HostAliases=”www.domain.tld localhost″

Once you’ve made these changes you’ll want to build your initial statistics, which will be generated from the current logs on your machine. We can do this using:

sudo /usr/lib/cgi-bin/awstats.pl -config=domain.tld -update

What this will do is scan the /etc/awstats folder for anything of the pattern awstats + domain.tld + conf, reading that config to generate its output. You should see some output here, and depending on the size of your logs it’ll take anywhere from a few seconds to a few minutes or hours. Each time it is run after that will be minimal, as it only updates the information, but the initial generation can take some time.

Configure Apache to Display AWStats

At this point our statistics should be generated (if not, go back and double check you haven’t missed anything!), but we need a way to see them. We’ll need to configure Apache2 to show us these stats. The way I did this was by using an Include in my apache2.conf, instead of cluttering up the default config file. This is generally my preferred method.

Apache2.conf already has a line near the botton Include /etc/apache2/conf.d/, which will read anything in there as additional data. What I did was create a new file in the /etc/apache2/conf.d/ directory called awstats, and filled it with the following content:

Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
ScriptAlias /awstats/ /usr/lib/cgi-bin/
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch

This is basically creating some access aliases, and defining the cgi-bin paths, etc. Once this is saved you should be able to restart Apache2 and we’ll should be able to access our stats. Restart Apache2 using:

sudo /etc/init.d/apache2 restart

You should now be able to access your statistics using:


Assuming you didn’t get any errors during your stats generation, and Apache2 didn’t complain when you restarted the service, you should see statistics at this point.

Continually Updating Your Stats

The last thing you’ll probably want to do is update your statistics via cron. This will allow you to have your site statistics updated on a regular basis, not requiring intervention on your part. What I have done is added a line to my /etc/crontab file telling AWStats to update every ten minutes. I have seen minimal system load even when updating a dozen sites on that interval. To update every ten minutes we’ll add the following line:

*/10 * * * * root /usr/lib/cgi-bin/awstats.pl -config=domain.tld -update >/dev/null

Repeat this line, updating the domain.tld value for any site you want continually updated.


Convert Pdf To word Using Able2Extract Professional

Lately I need the software converter Pdf to word because I prepare my thesis and some sources file come with PDF format and  I need to change them to word format. In my old post I write about konverter online PDF ke word dan Exel now I find the new software called Able2Extract Professional. Lets check this out guys.

  1. Open the programs. 1
  2. Open file from the directory :2
  3. Select All (CTRL +A) and select Convert to Word3
  4. Done
  5. Donwnload file  Here Password: cin1team.biz

WordPress Flickr Manager

Handles uploading, modifying images on Flickr, and insertion into posts.

Inserting images into posts could never have been easier. Simply click on an image from the added ‘Flickr Manager’ panel on the edit page and it will automatically be inserted into your post.

Download the file from Here


  1. Upload the folder wordpress-flickr-manager to the /wp-content/plugins/ directory1
  2. Activate the plugin through the Plugins menu in WordPress 2
  3. Authenticate with Flickr through Settings->Flickr 3458
  4. Add your widget : 9
  5. The Result: 10

Set up VNC server with resumable sessions

So here’s the complete list of steps that are required to set the VNC server that any user can login into and start a session. It is also persistent, meanning that even if you disconnect the VNC client your X session will not end (unless you explicitly log out) and you can reconnect to the same session again. The VNC server uses a separate display (:1) than your regular X server, which works with your physical display (:0). So two sessions can be active at the same time (one person sitting at the physical display and another remotely connecting using VNC).

1. Enable XDMCP
System->Administration->Login Screen Setup
Tab Security->Enable XDMCP
Tab XDMCP–> You can disable “Honor Indirect Requests”


Note: Before doing the next step, you need to make sure the extra repositories (e.g. universe) are enabled:

2. Install required packages (vncserver and xinetd)

sudo apt-get install vnc4server xinetd

Note to AMD64 users: The current version of vnc4server in the repositories has a bug, so you need to download and install the fixed vnc4 packages as shown below:

wget http://qt1.iq.usp.br/download/vnc4server_4.0-7.3_amd64.deb
wget http://qt1.iq.usp.br/download/xvnc4viewer_4.0-7.3_amd64.deb
sudo dpkg -i vnc4server_4.0-7.3_amd64.deb
sudo dpkg -i xvnc4viewer_4.0-7.3_amd64.deb

3. Set the VNC passwd

sudo vncpasswd /root/.vncpasswd

4. Add vnc service to xinetd:

sudo gedit /etc/xinetd.d/Xvnc

Enter this into the new file:

service Xvnc
        type = UNLISTED
        disable = no
        socket_type = stream
        protocol = tcp
        wait = yes
        user = root
        server = /usr/bin/Xvnc
        server_args = -inetd :1 -query localhost -geometry 1024x768 -depth 16 -once -fp /usr/share/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
        port = 5901

5. Restart xinetd (usually there is no need to reboot, but occasionally it might be required)

sudo /etc/init.d/xinetd stop
sudo killall Xvnc
sudo /etc/init.d/xinetd start

6. That’s it! To test that this is working first try to connect from the same machine (the machine we just set up the VNC server on):

vncviewer localhost:1

You should be prompted for the VNC password, and then see the GDM login screen where you can login and start a new X session. If that works, you can now go ahead and try to connect from remote machine using your favorite VNC client (remember to first close the local vncviewer we started above). Remember to use the VNC server machine’s domain name or IP address, followed by :1 (e.g. If connecting locally as shown above works, but connecting remotely fails, then this means you have a problem with a firewall which is blocking some ports. See the notes below about how to deal with that.

Note about ports: The VNC server set up as shown uses TCP port 5901. If you are using firewall software (e.g. firestarter) on that machine, you need to allow incoming connections on this port. If you are using a router which assigns your machine a private address (e.g. which is not accessible from the internet, then you need to forward TCP port 5901 from the router to this machine.

Note about security: This setup allows any user to start an X-session remotely by logging in using his regular password (after starting the VNC connection using the VNC password), so if the user disconnects without logging out, any other user which knows the VNC password can connect afterwards and resume the same session that the first user started. So if you do not want to log out before disconnecting, it’s advisable to at least lock your VNC X-session screen. Also note that while a remote user is connected thru VNC, no other connection will be accepted. An idle VNC client will be disconnected after one hour, but this can be changed by using the “-IdleTimeout” option in the server_args line in /etc/xinetd.d/Xvnc. For example, you can add “-IdleTimeout 300” to change it to 5 minutes.

WordPress Custom Login Page

WordPress Custom Login Page allows you to customize your login page beyond any plugin previously available. Your background image, logo image, text colors, link colors, button background image, and form div background are all customizable. You can also remove the “<– back to blog” link via css, and edit anything else in your login.css file via the built in CSS editor.

Screenshoot from prigadshop:

1How to sets and upload do this:

1. Download here

2. Upload to wp-content/plugins

3. Activate it via the Plugins page in your WordPress Admin section

4. Navigate to Settings>Custom Login Page to edit the settings


Advanced Help
Login Page Background (1500px by 400px maximum)
1. Create an image for the background, a maximum size of 1500px by 400px.
2. Upload to WordPress, using media uploader in WordPress Admin.
3. Copy the full url to the image and paste under Background Image URL option.
4. Enter position of image in the Background Image Position option.

Form Div Background Color
1. HEX Value (#FFFFFF). Use “none” if using a semi-transparent background image.

Other Options
For Label Font Color, Text Box Border Color, Login Button Font Color, Login Button Font Mouseover Color, Login Button Border Color, Login Button Border Mouseover Color, “Lost your password?” Link Font Color, and “Lost your password?” Link Mouseover Font Color.
1. HEX Values (#FFFFFF)

Login Button Background Image URL
1. Create any image width the size 68px by 22px. Non-repeating.
2. Upload via WordPress Media Uploader.
3. Insert link in plugin options page.
4. The button looks best if you pick a Login Button Border Color closest to your background color.

List of Background Position Values
If you only specify one keyword, the second value will be “center”. Default value is: 0% 0%.
top left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right
x% y% (The first value is the horizontal position and the second value is the vertical. The top left corner is 0% 0%. The right bottom corner is 100% 100%. If you only specify one value, the other value will be 50%.)

xpos ypos (The first value is the horizontal position and the second value is the vertical. The top left corner is 0 0. Units can be pixels (0px 0px) or any other CSS units. If you only specify one value, the other value will be 50%. You can mix % and positions)

inherit (Specifies that the setting of the background-position property should be inherited from the parent element.)

Background Repeat Values
repeat (Will repeat both horizontally and vertically.)
repeat-x (Will repeat only horizontally.)
repeat-y (Will repeat only vertically.)
no-repeat (Will not repeat at all.)
inherit (Will be inherited from the parent element.)

Custom CSS
1. You can enter css codes here, to overwrite default login page CSS.
2. For example, hiding the back to Example.com link, simply enter the following in the Custom CSS option.
#backtoblog { display:none; }
3. Do not include the opening and closing style CSS/HTML tags.

The result:


Your password in no longer valid. Please choose a new password

I’m  force user to change password for first time login to webmail zimbra, this error appeared ” Your password in no longer valid. Please choose a new password” this have bad spell and it should “Your password is no longer valid. Please choose a new password”. Is hard to find and change it. After search for several hour I am find the place :

Your password in no longer1.  Login as  #root

2. Change to zimbra user#su zimbra

3. Copy this code $ vi /opt/zimbra/jetty-6.1.5/webapps/zimbra/WEB-INF/classes/messages/ZMsg.properties

4. Find this account.CHANGE_PASSWORD = Your password in no longer valid. Please choose a new password.

5. And change from in to is

Your password in no longers

My Page Order

My Page Order allows you to set the order of pages through a drag and drop interface. The default method of setting the order page by page is extremely clumsy, especially with a large number of pages.

Download here


  1. Upload plugin contents to /wp-content/plugins/my-page-order
  2. Activate the My Page Order plugin on the Plugins menu
  3. Go to the “My Page Order” tab under Manage and specify your desired order for pages
  4. If you are using widgets then just make sure the “Page” widget is set to order by “Page order”. That’s it.
  5. If you aren’t using widgets, modify your sidebar template to use correct sort order: wp_list_pages('sort_column=menu_order&title_li=');



Add banner using plug-in WP-addpub

WP-addpub is a very simple plugin that let’s you upload your banners or your html and javascript code to your blog. Can be used, also, for any kind of script (google adsense, paypal donate, youtube video…)

The advantages of this plugin:

* Enabling and disabling the banner
* Display banners in different areas.
* Ability to display a banner depending on any special field (category, tag,…).
* Ability to display a banner depending on the language using the field filter.
* Ability to add/edit a script banner ( since 1.2).
* Ability to display a random banner ( since 1.2.1).


1. Unzip the file and place the folder wp-addpub in the directory plugins wordpress wp-content plugins
2. Activate the plug wp-addpub
3. Go on the management of banners in the Options> WP-Addpub

How-to use:

Add the following line in your theme:

<?php wp_addpub ( "bannerID=1" ) ; ?>

The parameter of the function is a string that contains variables:

* bannerID : Id of the banner
* zone: a text field that can be used to identify an area of your page (eg sidebar,… footer)
* filter: a text field that can be used as a criterion for display (ie value: French, English or Category1, Category2…)
* random : display a random banner (random=true) (since version 1.2.1)

These variables can be used separately or together (example: “zone=sidebar&filter=EN”)

Donwload here

For Detail Instructions follow my example:
1. Active your plug-in
2. Go on the management of banners in the Options> WP-Addpub

3. Insert your banner, I am  using html code:


4. Go to the index.php in your template  insert this code :  <?php wp_addpub ( “bannerID=1” ) ; ?>


5. See the result on your blog : (running text)


Change language at chrome browser

I am install google chrome in my computer and the default language is Indonesian that make me confiused to understand and I want change the default language to English, I search to internet and find this step :

Click the options from right top of google chrome:


Scroll down and than select Change font and language settings


Change the language you want: