Welcome! Log In Create A New Profile

Advanced

Help: SSL reverse proxy with tomcat

Posted by newadmin 
Help: SSL reverse proxy with tomcat
July 03, 2012 08:49PM
Hey Guys,

Im new to Ngynx and am having a hard time figuring out how to set up what I need with the documentation/wiki. Seems like this would be a common/simple thing so I'm hoping someone can help me out. Basically I have a tomcat webapp (Alfresco) which I want to secure using a reverse proxy. I also want to be able to get to the webapp by going to a short url rather than /something. Here's what I've got in my config so far.

server {

listen 443 default_server;
server_name _;

ssl on;
ssl_certificate /etc/nginx/conf.d/mycompany.com.crt;
ssl_certificate_key /etc/nginx/conf.d/mycompany.key;
ssl_session_cache shared:SSL:10m;

root /opt/alfresco/tomcat/webapps/alfresco;
index index.jsp;

location / {

proxy_pass http://localhost:8080;
proxy_set_header Host $host;

proxy_redirect http:// https://;
}
}

With this configuration I have been able to secure the site, but I am only able to access it using the URL using the long URL https://mycompany.com/share. There are 2 issues I have.

#1 - I would like to be able to access the site with a short URL (simply "mycompany.com").
#2 - I would like to have all regular HTTP requests (AKA port 80) be redirected to HTTPS so that the end user does not need to type HTTPS into their browser. Currently using http:// takes me to the default Nginx page.

If anyone could assist me it would be greatly appreciated. Thanks!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 204
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 494 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready