Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Saturday, 23 November 2013

Making website websitename:8080 to only websitename

 

1         1     Download the http war file from http://httpd.apache.org/download.cgi

2         2     Extract the file and install as per guided on http://httpd.apache.org/docs/2.2/install.html

3         3     Httpd.msi is available at www.anindya.com , for direct installation can be done on                        windows by simply double click on msi file.

4         4     After installing it as a service run the service and hit the url http://localhost to see if its                   working or not .

5         5     You can change the home page in 
                  C:/Program Files/Apache Software Foundation/Apache2.2/htdocs

6         6     Now our job is to show the tomcat/webapps/Root indexpage  when localhost is hit on               browser instead of  htdocs index page .

7         7     First go to the server.xml of tomcat/bin and uncomment the line 
<                    Connector port="8009" protocol="AJP/1.3"  redirectPort="8443" />  
                 and save it (note run note as admin to  save ).

8            Then download the mod_jk.so from the  http://tomcat.apache.org/connectors-doc/                         binaries which  should be suitable for your apache webserver version.

9         9     Paste the mod_jk.so file to apache/modules where all other .so are kept

1        10  Create workers.properties file in apache/conf folder paste the following and save it.

               worker.list=jk-status
               worker.jk-status.type=status               worker.jk-status.read_only=true               worker.list=jk-manager               worker.jk-manager.type=status               worker.list=jk-status               worker.jk-status.type=status               worker.jk-status.read_only=true               worker.list=jk-manager               worker.jk-manager.type=status               worker.balancer.error_escalation_time=0               worker.balancer.max_reply_timeouts=10               worker.balancer.balance_workers=node1               worker.node1.reference=worker.template               worker.node1.host=localhost               worker.node1.port=8109               worker.node1.activation=A               worker.balancer.balance_workers=node2               worker.node2.reference=worker.template               worker.node2.host=localhost               worker.node2.port=8209               worker.node2.activation=A               worker.template.type=ajp13               worker.template.socket_connect_timeout=5000               worker.template.socket_keepalive=true               worker.template.ping_mode=A               worker.template.ping_timeout=10000               worker.template.connection_pool_minsize=0               worker.template.connection_pool_timeout=600               worker.template.reply_timeout=300000               worker.template.recovery_options=3               worker.list=ajp13               worker.ajp13.port=8009               worker.ajp13.host=localhost               worker.ajp13.type=ajp13               worker.ajp13.lbfactor=1



1         11     Now Edit the httpd.conf file in apache/conf, paste the following
                       LoadModule jk_module modules/mod_jk.so
               JkWorkersFile conf/workers.properties
               JkShmFile  conf/mod_jk.shm
               JkLogFile  logs/from_apache_mod_jk.log
               JkLogLevel info
               JkLogStampFormat "[%a %b %d %H %M %S %Y]"
               JkMount /* ajp13

1          12.      Now restart the apache webserver.

1          13.  For more details about this topic you can visit the site 





Thursday, 21 November 2013

Customize the Apache web server


  •     Adding our own web pages:

      Web pages are added either in htdocs which is a default directory set in https.conf file or you can change the directory path by changing Document Root and making changes in directory label which already has default path

  •        Virtual host configuration:

1.     Virtual host has two types :

                                 I.   Different domain names (use for different website on same server) with same Ip address on same server.
                                 II.   Different domain names with different ip address on same server

2.    Add a domain name and own ip address in host file of windows.

3.    Add a line “  Include conf/virtual-hosts.conf” at the end of httpd file.

4.    Create virtual-hosts.conf file in conf folder.

5.    Add these line

 NameVirtualHost *:8080

<VirtualHost *:8080>
    
       ServerName www.localhost.com

        DocumentRoot "D:/website/web1"
       
        CustomLoglogs/www.localhost.com.access.logcombined
        ErrorLog logs/www.localhost.com.error.log

</virtualHost>

6.    You can add more than one tab of virtual host if want to assign more domain names.

7.    Change host file respectively

8.    Add Respective directory tab in httpd.conf file which will locate the website in system.


9.    Restart http.exe by closing it by ctrl+c and start it by double click on it.

Installing and running Apache web server

How to install Apache web server

     1. Enter the network domain name eg  example.net.

2.     Enter full DNS name  eg  server.example.net .

3.     Enter Administrator Email Address

4.     Select   i. For all user :- if want to run as service on port 80

                     ii. For current user :-for your personal experimenting.

5.     Select type typical or custom depending on your requirement.

6.     Use default path in c drive for installation


How to Run the Apache web server

1.     Go to apache folder in program files ,click on httpd (exe)

2.     Click on monitor apache server

3.     Check on httpd if it is showing any error or not.

Error may occur:

         Starting httpd: httpd: Could not reliably determine the server's fully qualified domain                       name, using ::1 for Server Name

 How to remove:-

1.     Search for the host file in 
        C:\windows\system32\drivers\etc\   or   %systemroot%\system32\drivers\etc\

2.     Open notepad using run as Administrator. Open this host file.

3.     Add your Full domain name and your IP address in this file save it

4.     Restart the monitor and httpd.exe