Showing posts with label conf. Show all posts
Showing posts with label conf. Show all posts

Saturday, August 29, 2015

How To Change the Default Page on Apache Tomcat


Double-click the 'My Computer' icon and navigate to the installation directory of Apache. In the 'conf' directory, double-click the 'httpd.conf' file.
Open httpd.conf with Notepad. Scroll down to the following line in the configuration file.
DirectoryIndex index.html index.jsp index.php
Change the DirectoryIndex line with the custom page. Below is an example of how the file should be configured for a custom default page.
DirectoryIndex myCustomPage.php index.html index.jsp index.php
VPS Hosting

Wednesday, August 26, 2015

How to Change Apache 2 Index.html


Log in to the remote server through SSH, or open a terminal window if you are located with the server.
Type 'cd /etc/apache2' at the terminal prompt to change to the Apache 2 directory where the configuration files are stored.
Open 'apache2.conf' in a text editor such as vi, pico or nano. Search for the 'DirectoryIndex' line, which will look similar to the following:DirectoryIndex index.html index.cgi index.pl
Edit the line to include new filenames, or remove existing pages. For example, you could change the directive to:DirectoryIndex index.php index.htmFiles are searched in the order which they appear, so the first file matching a name in the list will be displayed to the visitor. Save the file and close the text editor.
Restart Apache by typing '/etc/init.d/apache2 restart' at the terminal prompt.
VPS Hosting

Tuesday, August 25, 2015

How to Track Image Hits With AWStats


Connect to your Web server by using either your Web host's file manager or a File Transfer Protocol (FTP) application.
Navigate to the directory that contains your AWStats installation. Most Web hosting companies install the program in an 'awstats' folder in the root directory of your Web server. If you cannot find such a directory, contact your Web hosting company to get the exact location of your AWStats installation.
Download the 'awstats.yourdomainname.conf' file in that directory, where 'yourdomainname' is the actual domain name of your Web site.
Right-click on your file once you have downloaded it to your hard drive, select 'Open with...' and click on 'Notepad.'
Copy-and-paste the following code at the end of the file:ExtraSectionName1='Image Hits'ExtraSectionCodeFilter1='200 304'ExtraSectionCondition1='URL,.(jpe?g|gif|png)$'ExtraSectionFirstColumnTitle1='Image'ExtraSectionFirstColumnValues1='URL,^(\/.*.(jpe?g|gif|png))$'ExtraSectionFirstColumnFormat1='http://www.yourdomainname.com%s' TARGET='_blank'>%s'ExtraSectionStatTypes1=HBLExtraSectionAddSumRow1=1MaxNbOfExtra1=100MinHitExtra1=1Replace 'yourdomainname' with the domain name of your website. Save the file by pressing CTRL and S at the same time on your keyboard.
Upload the saved file to your Web server, in the same folder where you downloaded the original file. Press 'Yes' when the program asks if you want to replace the original file. A new 'Image Hits' section will now appear in your AWStats interface.
VPS Hosting