KEMBAR78
Https | PDF | Hypertext | Software Engineering
0% found this document useful (0 votes)
10 views2 pages

Https

Uploaded by

S D Venkatesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Https

Uploaded by

S D Venkatesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Contents

1. https configuration using nginx....................................................................................................1


2. Installing latest version of nginx...................................................................................................1
3. Configuring port for a new app in tomcat....................................................................................2

1. https configuration using nginx

a. Create folder in /etc/nginx

sudo mkdir sites-enabled

b. Add the following line in /etc/nginx/nginx.conf at the end in http section

include /etc/nginx/sites-enabled/*;

c. Copy .crt and .pem files into one of the directories (Eg: /etc/nginx/ssl)

d. Create a file (Eg: PPM) in /etc/nginx/sites-enabled and add the content similar to the one in
attached file below.

(Double click to see the content of a file)

e. Modify upstream section with proper port, certificate names/paths and server_name in the file
created in the above step.

f. Restart nginx

sudo service nginx restart

g. Check the url with http and https

2. Installing latest version of nginx

a. Add the following repository URLs to “/etc/apt/sources.list.d/nginx.list” (create if file does not
exist)

deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx


deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx

b. Now add nginx signing key by executing the below line in command prompt

wget –q –O– http://nginx.org/keys/nginx_signing.key | sudo apt–key add –

c. Update your system to latest package in nginx repos

sudo apt-get update


d. Install nginx

sudo apt-get install nginx

e. Check the version to see whether it reflected the changes or not


nginx -v

3. Configuring port for a new app in tomcat

a. Open server.xml file

sudo nano /opt/tomcat/apache…/conf/server.xml

b. Add the section similar to the one below in <server> section:

<Service name="prodocs">
<Connector port="8081" protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="20000" redirectPort="8443" />
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps/prodocs" unpackWARs="true"
autoDeploy="true">
</Host>
</Engine>
</Service>

c. Create a folder (Eg: prodocs) under webapps and copy an application war file into it.

d. Rename copied folder as ROOT.war

e. Restart Tomcat
sudo sh /opt/tomcat/apache…/bin/startup.sh

f. Open the url with the port given

You might also like