Sponsored Content
Top Forums Web Development Httpd proxy with mod_jk,ssl only on login page using .htacess Post 302884594 by new2ss on Tuesday 21st of January 2014 02:16:41 AM
Old 01-21-2014
Httpd proxy with mod_jk,ssl only on login page using .htacess

Hi all, I have a web app with the following pages, browse.jsp and shopping.jsp. I want to protect shopping.jsp with https. (https is only between browser and apache httpd server.)The https for the shopping.jsp page will terminate at the web server.

From web server to tomcat application server will be http connection, for both shopping.jsp and browse.jsp. I do not require mod_jk to pass on the https for the shopping.jsp page tomcat.

shopping.jsp will be accessed via https://myapp1.com/shoppingcart/shopping.jsp. Upon login, it will go to http://myapp1.com/shoppingcart/browse.jsp.

myapp1.com will be created in the dns to point to my webserver. Backend is apache tomcat.

My webserver and tomcat are on the same server.

This is what i have done.

1.In my httpd.conf
Code:
Listen 80

Listen 443
SSL Engine on
SSLCertificateFile C:..
SSLCertificateKeyFile C:..

2. in my mod_jk.conf
Code:
LoadModule jk_module modules/mod_jk.so
jkMount /* loadbalancer
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule ^/?(shopping.jsp$ https://localhost/shoppingcart/$1) [R,L,PT]
</IfModule>
JkMount /status/* status

With the above, i can access https://myapp1.com/shoppingcart/browse.jsp and https://myapp1.com/shoppingcart/shopping.jsp

When I change to http://myapp1.com/shoppingcart/browse.jsp or shopping.jsp l get HTTP 400 bad request.

Last edited by new2ss; 01-23-2014 at 09:51 PM.. Reason: added more code
 

7 More Discussions You Might Find Interesting

1. Web Development

APACHE: Tie in Web Page login with server login

Hello, I have created a web page on a server using apache and added .htaccess and .htpasswd in the folder for authentification. I was wondering if there was anyway to tie-in the login for this page with the login used to logon to the server. i.e. the same login info. is used for both,... (2 Replies)
Discussion started by: WhotheWhat
2 Replies

2. Cybersecurity

APACHE: Tie in Web Page login with server login

Hello, I have created a web page on a server using apache and added .htaccess and .htpasswd in the folder for authentification. I was wondering if there was anyway to tie-in the login for this page with the login used to logon to the server. i.e. the same login info. is used for both, when... (1 Reply)
Discussion started by: WhotheWhat
1 Replies

3. Web Development

Apache proxy for web app with ssl

I have a ubuntu server running subsonic as a web app. Currently the web interface is available from port 4040 for https connections and 4141 for https connections with the context /subsonic as follows: http://mydomain:4040/subsonic https://mydomain:4141/subsonic I would like to loose the port... (0 Replies)
Discussion started by: barrydocks
0 Replies

4. Web Development

CGI not working with httpd server on busybox 1.15.0 on ltib Linux 2.6.34 (404 page not found)

I have some industrial ARM linux board with 2.6.34 Linux on it with Busybox v1.15.0. The https.conf is located in /etc/ and contains: H:/root/web In the www directory I also have 'cgi-bin' folder with chmod 777 and in that folder a file called 'testcgi'. Now I start the server with... (1 Reply)
Discussion started by: Roboserg
1 Replies

5. Red Hat

Proxy tunneling failed: ForbiddenUnable to establish SSL connection.

Tryied both ways curl and wget wget --no-check-certificate https://mysitet.it:61617 --2017-05-05 17:29:02-- https://mysitet.it:61617/ Connecting to myproxy:8080... connected. Proxy tunneling failed: ForbiddenUnable to establish SSL connection. curl https://mysite.it:61617 curl: (56)... (3 Replies)
Discussion started by: charli1
3 Replies

6. Linux

Apache wildcard ssl on subdomain serves same page for non ssl virtualhosts

Issue observed: I have configured ng.my-site.com using widlcard ssl cert. When I hit https://www.my-site.com it loads ng.my-site.com website! please advise if I missed any concept / configs... Thank you! httpd.conf <VirtualHost *:80> ServerName www.my-site.com ServerAdmin... (0 Replies)
Discussion started by: ashokvpp
0 Replies

7. Proxy Server

Httpd proxy on AIX: failed to connect SSL

Hi, I am trying to migrate a quite old proxy server with Apache httpd, running on AIX The scenario is that my server accepts connections on http and proxies them to an SSL backend. This is done in a ProxyPass statement, as follows: ProxyPass /myservice/my-ws... (1 Reply)
Discussion started by: trifo75
1 Replies
jspc(1M)						    Application Server Utility							  jspc(1M)

NAME
jspc - precompiles JSP source files into servlets SYNOPSIS
jspc [options]jsp_filesor jspc [options]-webapp dir Use the jspc command to compile your JSP 1.2 compliant source files into servlets. To allow the application server to pick up the precom- piled JSPs from a JAR file, you must disable dynamic reloading of JSPs. To do this, set reload-interval property to -1 in the jsp-config element of the sun-web.xml file. For more information about the sun-web.xml file, see the Sun ONE Application Server Developer's Guide. jsp_files one or more JSP files to be compiled. -webapp dir a directory containing a web application. All JSPs in the directory and its subdirectories are compiled. You cannot specify a WAR, JAR, or ZIP file; you must first deploy it to an open directory structure using asadmin deploy. -q enables quiet mode (same as -v0). Only fatal error messages are displayed. -d dir the output directory for the compiled JSPs. Package directories are automatically generated based on the directo- ries containing the uncompiled JSPs. The default top-level directory is the directory from which jspc is invoked. -p name the name of the target package for all specified JSPs, overriding the default package generation performed by the -d option. -c name the target class name of the first JSP compiled. Subsequent JSPs are unaffected. -uribase dir the URI directory to which compilations are relative. Applies only to JSP files listed in the command, and not to JSP files specified with -webapp option. This is the location of each JSP file relative to the uriroot. If this cannot be determined, the default is /. -uriroot dir the root directory against which URI files are resolved. Applies only to JSP files listed in the command, and not to JSP files specified with -webapp option. If this option is not specified, all parent directories of the first JSP page are searched for a WEB-INF subdirectory. The closest directory to the JSP page that has one is used. If none of the JSP's parent directories have a WEB-INF subdirectory, the directory from which jspc is invoked is used. -genclass compiles the generated servlets into class files. -v [level] enables verbose mode. The level is optional; the default is 2. Possible level values are: o 0 - fatal error messages only o 1 - error messages only o 2 - error and warning messages only o 3 - error, warning, and informational messages o 4 - error, warning, informational, and debugging messages -mapped generates separate write calls for each HTML line and comments that describe the location of each line in the JSP file. By default, all adjacent write calls are combined and no location comments are generated. -die [code] causes the JVM to exit and generates an error return code if a fatal error occurs. If the code is absent or unparsable it defaults to 1. -webinc file creates partial servlet mappings for the -webapp option, which can be pasted into a web.xml file. -webxml file creates an entire web.xml file for the -webapp option. -ieplugin class_id specifies the Java plugin COM class ID for Internet Explorer. Used by the jsp:plugin tags. EXAMPLES
Example 1: Using jspc to compile the JSPs in a web application The following command compiles a set of JSP files into Java files under Hellodir: jspc -d Hellodir welcome.jsp shop.jsp checkout.jsp The following command compiles all the JSP files in the specified webapp into class files under Hellodir: jspc --d Hellodir --genclass --webapp /path_to_webapp_directory To use these precompiled JSP in the web application, put the generated files under Hellodir into a JAR file, place the JAR file under WEB- INF/lib and set reload-interval property to --1 in the jsp-config element of the WEB-INF/sun-web.xml file. asadmin(1M) Sun Java System Application Server March 2004 jspc(1M)
All times are GMT -4. The time now is 02:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy