view src/nabble/view/web/help/DNSConfiguration.jtp @ 60:36b0e32246d0

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 12 Jun 2022 19:20:41 -0600
parents 7ecd1a4ef557
children
line wrap: on
line source

<%
package nabble.view.web.help;

import fschmidt.util.servlet.JtpContext;
import nabble.view.lib.Cache;
import nabble.view.lib.Jtp;
import nabble.view.lib.Shared;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;


public final class DNSConfiguration extends HttpServlet {

	protected void service(HttpServletRequest request,HttpServletResponse response)
		throws ServletException, IOException
	{
		JtpContext jtpContext = (JtpContext)getServletContext().getAttribute(JtpContext.attrName);
		jtpContext.setEtag(request,response);
		PrintWriter out = response.getWriter();

		String nabbleHost = Jtp.getDefaultHost();
		%>
		<html>
			<head>
				<% Shared.head(request,response); %>
				<title>Configure a Domain Already Registered</title>
				<style type="text/css">
					div.field-title {
						margin: 0 0 .5em 0;
					}
					td.number {
						width: 3em;
						padding-bottom: .2em;
					}
					span.number {
						font-size: 200%;
						padding: 0 .3em .03em;
						border-width:1px;
						border-style:solid;
					}
					table.dns-table {
						margin:.5em 0 1em;
						border-width:1px;
						border-style:solid;
						width:80%;
					}
					td.dns-addr {
						width:20%;
					}
				</style>
			</head>
			<body>
				<% Shared.minHeaderGlobal(request,response); %>

				<h1>Configure a Domain Already Registered</h1>

				<p>
					The custom domain name feature allows you to setup your Nabble application with a domain name
					you've already registered through another registrar, such as GoDaddy.
				</p>

				<h2>Follow these steps to setup a custom domain name</h2>

				<table style="margin-left:1.3em">
					<tr valign="top">
						<td class="number"><span class="number shaded-bg-color medium-border-color">1</span></td>
						<td>
							<div class="second-font field-title">Login to your Domain Registrar account</div>
							Please go to your registrar's website (e.g., GoDaddy, Register.com, 1and1.com, etc.) and login.
						</td>
					</tr>
				</table>

				<table style="margin:1em 0 0 1.3em">
					<tr valign="top">
						<td class="number"><span class="number shaded-bg-color medium-border-color">2</span></td>
						<td>
							<div class="second-font field-title">Navigate to the domain's DNS Management page</div>
							You are looking to modify the CNAME-Record of your domain, NOT the name servers -- You need to leave your name servers configured with your existing registrar.
						</td>
					</tr>
				</table>

				<table style="margin:1em 0 0 1.3em">
					<tr valign="top">
						<td class="number"><span class="number shaded-bg-color medium-border-color">3</span></td>
						<td>
							<div class="second-font field-title">Setup CNAME-Record</div>
							If you are trying to setup a domain like www.mydomain.com, then you should set the CNAME-Record as follows:
							<table class="medium-border-color dns-table">
								<tr class="shaded-bg-color" style="font-weight:bold">
									<td>HOST</td>
									<td class="dns-addr">POINTS TO</td>
								</tr>
								<tr>
									<td>www</td>
									<td><%=nabbleHost%></td>
								</tr>								
							</table>
							If you are trying to setup just a sub-domain of your domain (e.g., myforum.mydomain.com), then you should set the CNAME-Record just for this sub-domain.
							<table class="medium-border-color dns-table">
								<tr class="shaded-bg-color" style="font-weight:bold">
									<td>HOST</td>
									<td class="dns-addr">POINTS TO</td>
								</tr>
								<tr>
									<td>myforum</td>
									<td><%=nabbleHost%></td>
								</tr>
							</table>
<% /* %>
							If you are trying to setup a domain without host (e.g., http://mydomain.com), then you should create the A-Record for the domain root.
							<table class="medium-border-color dns-table">
								<tr class="shaded-bg-color" style="font-weight:bold">
									<td>HOST</td>
									<td class="dns-addr">POINTS TO</td>
								</tr>
								<tr>
									<td>domain root (usually identified by a * or @ symbol)</td>
									<td><%=nabbleIP%></td>
								</tr>
							</table>
<% */ %>
						</td>
					</tr>
				</table>

				<p>
					<b>Note</b>: It can take up to 48 hours (although usually less) for these DNS changes propagate through the internet.
				</p>

				<% Shared.footer(request,response); %>
				<% Shared.analytics(request,response); %>
			</body>
		</html>
		<%
	}

}
%>