{"id":908,"date":"2021-12-07T08:54:55","date_gmt":"2021-12-07T08:54:55","guid":{"rendered":"https:\/\/shreyapohekar.com\/blogs\/?p=908"},"modified":"2021-12-08T08:30:26","modified_gmt":"2021-12-08T08:30:26","slug":"how-to-configure-ssl-on-ec2-instance","status":"publish","type":"post","link":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/","title":{"rendered":"How to configure SSL on EC2 instance for free"},"content":{"rendered":"\n<p class=\"has-drop-cap\">Hi everyone! I am Shreya Pohekar. This is yet another &#8220;how-to&#8221; category blog. In this post, I will be writing on how one can enable SSL and configure connections over HTTPS on their EC2 instances or instances hosted over any other cloud platform.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">But why would I want HTTPs?<\/h3>\n\n\n\n<p>Well, there can be several reasons.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>You run a blog page that is hosted on EC2 instance. According to google search engine latest guidelines, pages running on https are more likely to be amongst the top search results.<\/li><li>Just like me, you want to expoit CORs vulnerability where a custom origin is getting reflected. Just to give a gist here, I found a target where anything written after .com was getting reflected in the Access-Control-Allow-Origin header. Read more about headers <a href=\"https:\/\/shreyapohekar.com\/blogs\/the-ultimate-guide-to-http-request-response-headers\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span class=\"has-inline-color has-vivid-cyan-blue-color\">here<\/span><\/a>. Also the credentials were allowed.<\/li><\/ol>\n\n\n\n<p>Example: <strong>https:\/\/apps.redacted.com.shreyapohekar.com<\/strong> was getting reflected and credentials were allowed too, which means if the victim is logged in and clicks my cors exploit hosted on <strong>https:\/\/apps.redacted.com.shreyapohekar.com<\/strong>, I will be getting all of his sensitive information.<\/p>\n\n\n\n<p>I had an EC2 instance running but it was running on HTTP. However for the exploit to work, it should run on HTTPs (as HTTP was not allowed \ud83d\ude41 ). <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Lets do the configurations!!<\/h3>\n\n\n\n<p>If you just want https over your subdomain you can skip this section. If you use case wants you to configure nested subdomain (abc.xyz.efg.domain.com), follow along the blog.<\/p>\n\n\n\n<p>As you can see, the subdomain is nested here (apps.redacted.com), so it cant be directly configured from the subdomain section.<\/p>\n\n\n\n<p>For nested subdomain configuration:-<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Go to you domain provider \/ Hosting provider, based on whose nameservers you are using.<\/li><li>Search for dns zone editor.<\/li><li>Create a A record<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"576\" height=\"361\" src=\"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/11\/image.png\" alt=\"\" class=\"wp-image-909\" srcset=\"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/11\/image.png 576w, https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/11\/image-300x188.png 300w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><figcaption>This is done in hostinger as the nameserver I use is of hostinger.<\/figcaption><\/figure>\n\n\n\n<p>The points to IP address should be the one of your EC2 instance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setting up SSL on EC2<\/h3>\n\n\n\n<p>The very first step here is to install the apache2 package. You can do that from <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># apt-get update\n# apt-get install apache2\n\nTo restart enable the apache2 service\n# service apache2 restart<\/pre>\n\n\n\n<p>It is as simple as that. Once your apache is up and running you will get an index page once you open the public IP address of the ec2 instance.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>If you dont get the index page, make sure that the EC2 instance security groups are configured to address the incomming request for http<\/p><\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">SSL for free<\/h3>\n\n\n\n<p><a href=\"https:\/\/www.sslforfree.com\/\">https:\/\/www.sslforfree.com\/<\/a> is a website from where you can create SSL certificates that will be valid for 90 days from its creation date. When you get there, it will provide you a step by step guide to create the certificate.<\/p>\n\n\n\n<p>Once the setup is complete, a zip is downloaded containing the private key, certificate.crt and the ca_bundle.crt.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Invalid CAA records<\/h3>\n\n\n\n<p>While generating the SSL key and certification, you might run into an error stating &#8220;Invalid CAA records&#8221;<\/p>\n\n\n\n<p>This happens when you try to verify your domain with sslforfree. A fix for this is to add a new CAA record. This can be done in DNS management portal\/ DNS zone editor.<\/p>\n\n\n\n<p>The fields should look like the following<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"587\" height=\"463\" src=\"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-1.png\" alt=\"\" class=\"wp-image-919\" srcset=\"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-1.png 587w, https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-1-300x237.png 300w\" sizes=\"(max-width: 587px) 100vw, 587px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"974\" height=\"61\" src=\"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-2.png\" alt=\"\" class=\"wp-image-922\" srcset=\"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-2.png 974w, https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-2-300x19.png 300w, https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-2-768x48.png 768w, https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-2-640x40.png 640w\" sizes=\"(max-width: 974px) 100vw, 974px\" \/><figcaption>CAA entry in DNS<\/figcaption><\/figure>\n\n\n\n<p>I assure that there won&#8217;t be any more issues you will face while generating the certificate.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Apache configuration for SSL<\/h3>\n\n\n\n<p>Apache configuration files can be found in \/etc for Linux instances. <\/p>\n\n\n\n<p>First of all, create a folder under \/etc\/apache2 by name ssl. Copy all the 3 files (private_key, certificate, ca_bundle) obtained from the zip in this folder.<\/p>\n\n\n\n<p>Now, an entry has to be created for sites-enabled.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Open the file with<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code wpf-blue-background\"><code># vim \/etc\/apache2\/sites-enabled\/000-default.conf<\/code><\/pre>\n\n\n\n<p>Do the following entry at the end.<\/p>\n\n\n\n<pre class=\"wp-block-code wpf-blue-background\"><code>&lt;VirtualHost *:443&gt;\n\nServerAdmin webmaster@localhost\nServerName shreyapohekar.com\nServerAlias apps.redacted.com.shreyapohekar.com\nDocumentRoot \/var\/www\/html\nSSLEngine on\nSSLCertificateFile \/etc\/apache2\/ssl\/certificate.crt\nSSLCertificateKeyFile \/etc\/apache2\/ssl\/private\/private.key\nSSLCertificateChainFile \/etc\/apache2\/ssl\/ca_bundle.crt\n\n&lt;\/VirtualHost&gt;<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\"><li>With VirtualHost directive, multiple domains can run on a single webserver (Ec2 in this case). <\/li><li>DocumentRoot specifies the path on the webserver that will be used as the base location for the domain.<\/li><li>SSLCertificateFile, SSLCertificateKeyFile, SSLCertificateChainFile are SSL related files that helps in setting up the encryption over http.<\/li><\/ol>\n\n\n\n<p>The apache service now can be restarted using<\/p>\n\n\n\n<pre class=\"wp-block-code wpf-blue-background\"><code># service apache2 restart<\/code><\/pre>\n\n\n\n<p>And you are now good to go. Open https:\/\/apps.redacted.com.shreyapohekar.com in the browser. If you don&#8217;t get the index page and your site is still loading, then the problem is with security groups.<\/p>\n\n\n\n<p>Configure the inbound connection for https from any IP in the world.<\/p>\n\n\n\n<p>This is how an inbound security group for a ec2 instance should look like.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"297\" src=\"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-1024x297.png\" alt=\"\" class=\"wp-image-912\" srcset=\"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-1024x297.png 1024w, https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-300x87.png 300w, https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-768x223.png 768w, https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image-640x186.png 640w, https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/image.png 1033w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>That&#8217;s all for the blog post. See you in the next one.<\/p>\n\n\n\n<p>Until then, happy learning \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The post is a walkthrough on how to configure ssl on linux instances. This can also be helpful when exploiting CORS.<\/p>\n","protected":false},"author":1,"featured_media":914,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"","ocean_second_sidebar":"","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"","ocean_custom_header_template":"","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"","ocean_menu_typo_font_family":"","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[141,257],"tags":[349,354,337,71,351,350,353,352],"class_list":["post-908","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-web-application","tag-cors","tag-cors-exploitation","tag-domain","tag-linux","tag-nested-domain","tag-ssl","tag-sslforfree","tag-subdomain","entry","has-media"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"The post is a walkthrough on how to configure ssl on linux instances. This can also be helpful when exploiting CORS.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"shreyapohekar\"\/>\n\t<meta name=\"google-site-verification\" content=\"y_3exmP-yXmpf_8pYjWbkeaT2VJmyungNEKJyiRmxL8\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Geek Girl | What I learn is what I BLOG!\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to configure SSL on EC2 instance for free | Geek Girl\" \/>\n\t\t<meta property=\"og:description\" content=\"The post is a walkthrough on how to configure ssl on linux instances. This can also be helpful when exploiting CORS.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/04\/logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/04\/logo.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-12-07T08:54:55+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-12-08T08:30:26+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@shreyapohekar\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to configure SSL on EC2 instance for free | Geek Girl\" \/>\n\t\t<meta name=\"twitter:description\" content=\"The post is a walkthrough on how to configure ssl on linux instances. This can also be helpful when exploiting CORS.\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@shreyapohekar\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/04\/logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#blogposting\",\"name\":\"How to configure SSL on EC2 instance for free | Geek Girl\",\"headline\":\"How to configure SSL on EC2 instance for free\",\"author\":{\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/author\\\/shreyapohekar\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/https.png\",\"width\":586,\"height\":281,\"caption\":\"configure ssl on linux instance\"},\"datePublished\":\"2021-12-07T08:54:55+00:00\",\"dateModified\":\"2021-12-08T08:30:26+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#webpage\"},\"articleSection\":\"linux, Web application, cors, cors exploitation, domain, linux, nested domain, ssl, sslforfree, subdomain\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/category\\\/information-security\\\/#listItem\",\"name\":\"Information Security\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/category\\\/information-security\\\/#listItem\",\"position\":2,\"name\":\"Information Security\",\"item\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/category\\\/information-security\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/category\\\/information-security\\\/linux\\\/#listItem\",\"name\":\"linux\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/category\\\/information-security\\\/linux\\\/#listItem\",\"position\":3,\"name\":\"linux\",\"item\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/category\\\/information-security\\\/linux\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#listItem\",\"name\":\"How to configure SSL on EC2 instance for free\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/category\\\/information-security\\\/#listItem\",\"name\":\"Information Security\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#listItem\",\"position\":4,\"name\":\"How to configure SSL on EC2 instance for free\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/category\\\/information-security\\\/linux\\\/#listItem\",\"name\":\"linux\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/#person\",\"name\":\"shreyapohekar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/166952c6ef739064bc03c48b2ee9e49d?s=96&d=wavatar&r=g\",\"width\":96,\"height\":96,\"caption\":\"shreyapohekar\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/author\\\/shreyapohekar\\\/#author\",\"url\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/author\\\/shreyapohekar\\\/\",\"name\":\"shreyapohekar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/166952c6ef739064bc03c48b2ee9e49d?s=96&d=wavatar&r=g\",\"width\":96,\"height\":96,\"caption\":\"shreyapohekar\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#webpage\",\"url\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/\",\"name\":\"How to configure SSL on EC2 instance for free | Geek Girl\",\"description\":\"The post is a walkthrough on how to configure ssl on linux instances. This can also be helpful when exploiting CORS.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/author\\\/shreyapohekar\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/author\\\/shreyapohekar\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/https.png\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#mainImage\",\"width\":586,\"height\":281,\"caption\":\"configure ssl on linux instance\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/how-to-configure-ssl-on-ec2-instance\\\/#mainImage\"},\"datePublished\":\"2021-12-07T08:54:55+00:00\",\"dateModified\":\"2021-12-08T08:30:26+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/#website\",\"url\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/\",\"name\":\"Geek Girl\",\"description\":\"What I learn is what I BLOG!\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/shreyapohekar.com\\\/blogs\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to configure SSL on EC2 instance for free | Geek Girl","description":"The post is a walkthrough on how to configure ssl on linux instances. This can also be helpful when exploiting CORS.","canonical_url":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"y_3exmP-yXmpf_8pYjWbkeaT2VJmyungNEKJyiRmxL8","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#blogposting","name":"How to configure SSL on EC2 instance for free | Geek Girl","headline":"How to configure SSL on EC2 instance for free","author":{"@id":"https:\/\/shreyapohekar.com\/blogs\/author\/shreyapohekar\/#author"},"publisher":{"@id":"https:\/\/shreyapohekar.com\/blogs\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/https.png","width":586,"height":281,"caption":"configure ssl on linux instance"},"datePublished":"2021-12-07T08:54:55+00:00","dateModified":"2021-12-08T08:30:26+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#webpage"},"isPartOf":{"@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#webpage"},"articleSection":"linux, Web application, cors, cors exploitation, domain, linux, nested domain, ssl, sslforfree, subdomain"},{"@type":"BreadcrumbList","@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/shreyapohekar.com\/blogs#listItem","position":1,"name":"Home","item":"https:\/\/shreyapohekar.com\/blogs","nextItem":{"@type":"ListItem","@id":"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/#listItem","name":"Information Security"}},{"@type":"ListItem","@id":"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/#listItem","position":2,"name":"Information Security","item":"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/","nextItem":{"@type":"ListItem","@id":"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/linux\/#listItem","name":"linux"},"previousItem":{"@type":"ListItem","@id":"https:\/\/shreyapohekar.com\/blogs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/linux\/#listItem","position":3,"name":"linux","item":"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/linux\/","nextItem":{"@type":"ListItem","@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#listItem","name":"How to configure SSL on EC2 instance for free"},"previousItem":{"@type":"ListItem","@id":"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/#listItem","name":"Information Security"}},{"@type":"ListItem","@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#listItem","position":4,"name":"How to configure SSL on EC2 instance for free","previousItem":{"@type":"ListItem","@id":"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/linux\/#listItem","name":"linux"}}]},{"@type":"Person","@id":"https:\/\/shreyapohekar.com\/blogs\/#person","name":"shreyapohekar","image":{"@type":"ImageObject","@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/166952c6ef739064bc03c48b2ee9e49d?s=96&d=wavatar&r=g","width":96,"height":96,"caption":"shreyapohekar"}},{"@type":"Person","@id":"https:\/\/shreyapohekar.com\/blogs\/author\/shreyapohekar\/#author","url":"https:\/\/shreyapohekar.com\/blogs\/author\/shreyapohekar\/","name":"shreyapohekar","image":{"@type":"ImageObject","@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/166952c6ef739064bc03c48b2ee9e49d?s=96&d=wavatar&r=g","width":96,"height":96,"caption":"shreyapohekar"}},{"@type":"WebPage","@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#webpage","url":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/","name":"How to configure SSL on EC2 instance for free | Geek Girl","description":"The post is a walkthrough on how to configure ssl on linux instances. This can also be helpful when exploiting CORS.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/shreyapohekar.com\/blogs\/#website"},"breadcrumb":{"@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#breadcrumblist"},"author":{"@id":"https:\/\/shreyapohekar.com\/blogs\/author\/shreyapohekar\/#author"},"creator":{"@id":"https:\/\/shreyapohekar.com\/blogs\/author\/shreyapohekar\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/12\/https.png","@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#mainImage","width":586,"height":281,"caption":"configure ssl on linux instance"},"primaryImageOfPage":{"@id":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/#mainImage"},"datePublished":"2021-12-07T08:54:55+00:00","dateModified":"2021-12-08T08:30:26+00:00"},{"@type":"WebSite","@id":"https:\/\/shreyapohekar.com\/blogs\/#website","url":"https:\/\/shreyapohekar.com\/blogs\/","name":"Geek Girl","description":"What I learn is what I BLOG!","inLanguage":"en-US","publisher":{"@id":"https:\/\/shreyapohekar.com\/blogs\/#person"}}]},"og:locale":"en_US","og:site_name":"Geek Girl | What I learn is what I BLOG!","og:type":"article","og:title":"How to configure SSL on EC2 instance for free | Geek Girl","og:description":"The post is a walkthrough on how to configure ssl on linux instances. This can also be helpful when exploiting CORS.","og:url":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/","og:image":"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/04\/logo.png","og:image:secure_url":"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/04\/logo.png","og:image:width":500,"og:image:height":500,"article:published_time":"2021-12-07T08:54:55+00:00","article:modified_time":"2021-12-08T08:30:26+00:00","twitter:card":"summary_large_image","twitter:site":"@shreyapohekar","twitter:title":"How to configure SSL on EC2 instance for free | Geek Girl","twitter:description":"The post is a walkthrough on how to configure ssl on linux instances. This can also be helpful when exploiting CORS.","twitter:creator":"@shreyapohekar","twitter:image":"https:\/\/shreyapohekar.com\/blogs\/wp-content\/uploads\/2021\/04\/logo.png"},"aioseo_meta_data":{"post_id":"908","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-08-20 07:20:22","updated":"2025-06-03 23:38:48","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/shreyapohekar.com\/blogs\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/\" title=\"Information Security\">Information Security<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/linux\/\" title=\"linux\">linux<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to configure SSL on EC2 instance for free\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/shreyapohekar.com\/blogs"},{"label":"Information Security","link":"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/"},{"label":"linux","link":"https:\/\/shreyapohekar.com\/blogs\/category\/information-security\/linux\/"},{"label":"How to configure SSL on EC2 instance for free","link":"https:\/\/shreyapohekar.com\/blogs\/how-to-configure-ssl-on-ec2-instance\/"}],"_links":{"self":[{"href":"https:\/\/shreyapohekar.com\/blogs\/wp-json\/wp\/v2\/posts\/908"}],"collection":[{"href":"https:\/\/shreyapohekar.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shreyapohekar.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shreyapohekar.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shreyapohekar.com\/blogs\/wp-json\/wp\/v2\/comments?post=908"}],"version-history":[{"count":7,"href":"https:\/\/shreyapohekar.com\/blogs\/wp-json\/wp\/v2\/posts\/908\/revisions"}],"predecessor-version":[{"id":923,"href":"https:\/\/shreyapohekar.com\/blogs\/wp-json\/wp\/v2\/posts\/908\/revisions\/923"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shreyapohekar.com\/blogs\/wp-json\/wp\/v2\/media\/914"}],"wp:attachment":[{"href":"https:\/\/shreyapohekar.com\/blogs\/wp-json\/wp\/v2\/media?parent=908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shreyapohekar.com\/blogs\/wp-json\/wp\/v2\/categories?post=908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shreyapohekar.com\/blogs\/wp-json\/wp\/v2\/tags?post=908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}