Posts

Showing posts with the label SSL

How to enable multiple domains in Apache Server using Name-Based VirtualHosts and SSL

Scenario: I have an Apache Server(SSL enabled) and tomcat running on my machine and there is one application (app1) hosted on tomcat which is only accessible from Apache Server. You cannot access it directly from tomcat. Now you want to access app1 using multiple domains i.e. domain1.waheedtechblog.com annd domain2.waheedtechblog.com should point to the same application which is hosted on tomcat. (I want to implement different Authentication mechanism based on different domains) Solution: The above case can be achieved using NameBased VirtualHosts and SSL. First you need to uncomment following lines form ${apache}/conf/httpd.conf file LoadModule ssl_module modules/mod_ssl.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_ajp_module modules/mod_proxy_ajp.so LoadModule rewrite_module modules/mod_rewrite.so LoadModule proxy_http_module modules/mod_proxy_http.so Include conf/extra/httpd-ssl.conf then goto ${apache}/conf/extra/httpd-ssl.co...