Sharing the Point

Office 365, SharePoint, Project Server – Support Blog

Posts Tagged ‘Web server’

How to Redirect all Apache 2.x Request to Tomcat 6.x.x using mod_proxy Module

Posted by Ashraf on January 2, 2011

Consider: Apache 2.x is running on port 80, Tomcat 6.x.x is on port 8080

  1. Got to {Apche2 installation folder}\Apache2.2\conf , Open httpd.conf to edit
  2. Uncomment the following three lines,
    1. LoadModule proxy_module modules/mod_proxy.so
    2. LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
    3. LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
  3. Add the following entry to the main section of httpd.conf file

      #Enableing proxy for rediretion to tomcat

      ProxyRequests Off

      ProxyPreserveHost On

      <Proxy *>

      Order deny,allow

      Allow from all

      </Proxy>

      ProxyPass / ajp://localhost:8009/

      ProxyPassReverse / ajp://localhost:8009/

      <Location / >

      Order allow,deny

      Allow from all

      </Location>

  4. Test by typing http://localhost; tomcat default page will come up.

Posted in System Administration, Windows Server | Tagged: , , , | 3 Comments »

How to Install Certificate Enrollment Web Service

Posted by Ashraf on December 8, 2010

After my previous post on How to Install Certificate Services on Windows Server 2008 R2.

You’ve now got a Certificate Authority- Root CA, that is capable of issuing certificates to your servers and users.  You can go back through the wizard and install additional CA components, for example, that will allow you to issue certificates to users and computers that are/are not part of your domain.  That option is called ‘Certificate Enrollment Web Service’. Go through the following steps:

1.       Select Add Role Services from the Active Directory Certificate Services Role. Wizard will guide you through.

2.       From the Select Role Services choose Certificate Enrollment Web Service, Certificate Enrollment Policy Web Service and click Next.

Select Role Services

Select Role Services

3.       For Specify CA for certificate Enrollment Web Services; leave the default CA settings (i.e. CA name), Next

Specify CA for certificate Enrollment Web Services

Specify CA for certificate Enrollment Web Services

4.       Select Windows Integrated Authentication Type, Click Next

Windows Integrated Authentication

Windows Integrated Authentication

5.       Before doing this step, please add your administrator account to the IIS_USER group

6.       Specify service account credentials for certificate enrollment web service; add your administrator account and password. Click Ok then, Next

service account credentials

service account credentials

7.       Installation result page will show you the result and close the page after you are informed.

installation result page

installation result page

These are all for installing a Root Certificate Authority (CA) and Enrollment web service for Microsoft Active Directory Certificate Service.

Hope it helps!!

Posted in Digital Certificate - SSL, System Administration, Windows Server | Tagged: , , , , | Comments Off on How to Install Certificate Enrollment Web Service

How to Display Custom Error Page on Tomcat 6

Posted by Ashraf on December 3, 2010

If you are Unhappy with the default error pages that come with Tomcat then You can define your own custom error pages in your web.xml file after the following tag:

<welcome-file-list>

<welcome-file>index.html</welcome-file>

</welcome-file-list>

In the example shown below, i define 2 html pages — web_server_error_500.html and file_not_found_404.html which will be displayed when the server encounters an error 500 or an error 404 respectively. Put your html files on tomcat6.0/webapps/Root folder.  And add this code on web.xml file.

<error-page>

<error-code>500</error-code>

<location>/web_server_error_500.html</location>

</error-page>

<error-page>

<error-code>404</error-code>

<location>/file_not_found_404.html</location>

</error-page>

Please be aware that the order of the tags for the web.xml file is very important. If the order in your web.xml file is incorrect, Tomcat will output errors on startup.

And for Internet Explorer users be sure you have enabled “Show custom error pages” from Internet Options>Advanced tab.

Posted in System Administration | Tagged: , , , | Comments Off on How to Display Custom Error Page on Tomcat 6

How to Configure Tomcat 6 – Custom Default Pages

Posted by Ashraf on December 1, 2010

Tomcat uses the same convention as the Apache Web Server in that index.html is

the default or home page of any directory. Sometimes you may want to change that

to homepage.html or maybe a JSP page, like home.jsp.

To do that, simply open the web.xml of your web application, and add the

following lines without commenting :

<welcome-file-list>

<welcome-file>home.jsp</welcome-file>

<welcome-file>homepage.html</welcome-file>

<welcome-file>index.html</welcome-file>

</welcome-file-list>

To change it system-wide, edit the global web.xml in $CATALINA_HOME/conf, and

change the to point to the file of your choice.

Posted in System Administration, Windows Server | Tagged: , , , | Comments Off on How to Configure Tomcat 6 – Custom Default Pages

How to Redirect all http requests to https on Tomcat by default

Posted by Ashraf on November 23, 2010

***Considering that you already enable SSL with proper certificate.

To auto redirect all of your webserver requests from http to https just paste the following to your tomcat installation folder\conf\web.xml file and restart the service.

<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Context</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<!– auth-constraint goes here if you requre authentication –>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>

Now browse http://localhost and it will automatically go to https://localhost , for example.

Posted in System Administration, Windows Server | Tagged: , , , , , | Comments Off on How to Redirect all http requests to https on Tomcat by default