-
1. Redirect 8080 to 8443 on gatein portal
rraposa Mar 5, 2011 10:07 AM (in response to rabee)When you say it doesn't work, what happens exactly? And are you getting any kind of error message?
Maybe show us the rest of your <security-constraint> in web.xml. You may have an issue with your url-pattern.
-
2. Redirect 8080 to 8443 on gatein portal
rabee Mar 5, 2011 10:17 AM (in response to rraposa)No I do'nt get any error or exception.
I expect when going to "http://localhost:8080/portal" the browser change it to "https://localhost:8443/portal". But it does not change to the secure ssl url. It remains the same like "http://localhost:8080/portal" and the site loads as usual.
the <security-constraint> in web.xml is defual of gatein.ear :
jboss-epp-5.1.0\jboss-epp-5.1\jboss-as\server\default\deploy\gatein.ear\02portal.war\WEB-INF\web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>user authentication</web-resource-name>
<url-pattern>/private/*</url-pattern>
<http-method>POST</http-method>
<http-method>GET</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>users</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>admin authentication</web-resource-name>
<url-pattern>/admin/*</url-pattern>
<http-method>POST</http-method>
<http-method>GET</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Many Thanks,
Rabee
-
3. Redirect 8080 to 8443 on gatein portal
rabee Mar 5, 2011 10:20 AM (in response to rabee)And this is the configuration of server.xml:
<Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"
compression="on"
compressableMimeType="text/html,text/xml,text/css,text/javascript, application/x-javascript,application/javascript"
connectionTimeout="20000" redirectPort="8443" />
<Connector protocol="AJP/1.3" port="8009" address="${jboss.bind.address}"
redirectPort="8443" />
<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="8443" address="${jboss.bind.address}"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore"
keystorePass="ehrkeystore" sslProtocol = "TLS" />
-
4. Redirect 8080 to 8443 on gatein portal
rraposa Mar 5, 2011 10:27 AM (in response to rabee)Sorry Rabee - I didn't look closely to your URLs. If you go to:
then the portal site will load normally. For the SSL redirect to work, you need to add the "s" to the protocol:
That should redirect you to 8443.
-
5. Redirect 8080 to 8443 on gatein portal
rabee Mar 5, 2011 10:33 AM (in response to rraposa)I want the server automathically does it. I want may portal load on ssl authomatically even if the user enter the http://localhost:8080/portal.
I mean the server should automatically change the http://localhost:8080/portal to https://localhost:8080/portal
-
6. Redirect 8080 to 8443 on gatein portal
rraposa Mar 5, 2011 10:39 AM (in response to rabee)I suppose you could modify your index.jsp file to do the redirect. Or install Apache out in front and use mod_rewrite. I don't think Tomcat is capable of the behavior you want.
-
7. Redirect 8080 to 8443 on gatein portal
rabee Mar 6, 2011 4:41 AM (in response to rraposa)Thanks very much Rich.
-
8. Re: Redirect 8080 to 8443 on gatein portal
fyakin Oct 30, 2012 2:19 PM (in response to rabee)Hi Rabee,
Did you find the solution with redirecting port 8080 to port 8443?
I have the same problem now
Could you share with me, if your issue resolved yet? And what I need to do?
Thanks
Francis