Mercurial Hosting > nabble
comparison src/nabble/view/web/help/DNSConfiguration.java @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children | 36b0e32246d0 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
1 | |
2 package nabble.view.web.help; | |
3 | |
4 import fschmidt.util.servlet.JtpContext; | |
5 import nabble.view.lib.Cache; | |
6 import nabble.view.lib.Jtp; | |
7 import nabble.view.lib.Shared; | |
8 | |
9 import javax.servlet.ServletException; | |
10 import javax.servlet.http.HttpServlet; | |
11 import javax.servlet.http.HttpServletRequest; | |
12 import javax.servlet.http.HttpServletResponse; | |
13 import java.io.IOException; | |
14 import java.io.PrintWriter; | |
15 import java.net.InetAddress; | |
16 | |
17 | |
18 public final class DNSConfiguration extends HttpServlet { | |
19 | |
20 protected void service(HttpServletRequest request,HttpServletResponse response) | |
21 throws ServletException, IOException | |
22 { | |
23 JtpContext jtpContext = (JtpContext)getServletContext().getAttribute(JtpContext.attrName); | |
24 jtpContext.setEtag(request,response); | |
25 PrintWriter out = response.getWriter(); | |
26 | |
27 String nabbleHost = Jtp.getDefaultHost(); | |
28 | |
29 out.print( "\n<html>\n <head>\n " ); | |
30 Shared.head(request,response); | |
31 out.print( "\n <title>Configure a Domain Already Registered</title>\n <style type=\"text/css\">\n div.field-title {\n margin: 0 0 .5em 0;\n }\n td.number {\n width: 3em;\n padding-bottom: .2em;\n }\n span.number {\n font-size: 200%;\n padding: 0 .3em .03em;\n border-width:1px;\n border-style:solid;\n }\n table.dns-table {\n margin:.5em 0 1em;\n border-width:1px;\n border-style:solid;\n width:80%;\n }\n td.dns-addr {\n width:20%;\n }\n </style>\n </head>\n <body>\n " ); | |
32 Shared.minHeaderGlobal(request,response); | |
33 out.print( "\n\n <h1>Configure a Domain Already Registered</h1>\n\n <p>\n The custom domain name feature allows you to setup your Nabble application with a domain name\n you've already registered through another registrar, such as GoDaddy.\n </p>\n\n <h2>Follow these steps to setup a custom domain name</h2>\n\n <table style=\"margin-left:1.3em\">\n <tr valign=\"top\">\n <td class=\"number\"><span class=\"number shaded-bg-color medium-border-color\">1</span></td>\n <td>\n <div class=\"second-font field-title\">Login to your Domain Registrar account</div>\n Please go to your registrar's website (e.g., GoDaddy, Register.com, 1and1.com, etc.) and login.\n </td>\n </tr>\n </table>\n\n <table style=\"margin:1em 0 0 1.3em\">\n <tr valign=\"top\">\n <td class=\"number\"><span class=\"number shaded-bg-color medium-border-color\">2</span></td>\n <td>\n <div class=\"second-font field-title\">Navigate to the domain's DNS Management page</div>\n 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.\n </td>\n </tr>\n </table>\n\n <table style=\"margin:1em 0 0 1.3em\">\n <tr valign=\"top\">\n <td class=\"number\"><span class=\"number shaded-bg-color medium-border-color\">3</span></td>\n <td>\n <div class=\"second-font field-title\">Setup CNAME-Record</div>\n If you are trying to setup a domain like www.mydomain.com, then you should set the CNAME-Record as follows:\n <table class=\"medium-border-color dns-table\">\n <tr class=\"shaded-bg-color\" style=\"font-weight:bold\">\n <td>HOST</td>\n <td class=\"dns-addr\">POINTS TO</td>\n </tr>\n <tr>\n <td>www</td>\n <td>" ); | |
34 out.print( (nabbleHost) ); | |
35 out.print( "</td>\n </tr> \n </table>\n 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.\n <table class=\"medium-border-color dns-table\">\n <tr class=\"shaded-bg-color\" style=\"font-weight:bold\">\n <td>HOST</td>\n <td class=\"dns-addr\">POINTS TO</td>\n </tr>\n <tr>\n <td>myforum</td>\n <td>" ); | |
36 out.print( (nabbleHost) ); | |
37 out.print( "</td>\n </tr>\n </table>\n" ); | |
38 /* | |
39 out.print( "\n 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.\n <table class=\"medium-border-color dns-table\">\n <tr class=\"shaded-bg-color\" style=\"font-weight:bold\">\n <td>HOST</td>\n <td class=\"dns-addr\">POINTS TO</td>\n </tr>\n <tr>\n <td>domain root (usually identified by a * or @ symbol)</td>\n <td>" ); | |
40 out.print( (nabbleIP) ); | |
41 out.print( "</td>\n </tr>\n </table>\n" ); | |
42 */ | |
43 out.print( "\n </td>\n </tr>\n </table>\n\n <p>\n <b>Note</b>: It can take up to 48 hours (although usually less) for these DNS changes propagate through the internet.\n </p>\n\n " ); | |
44 Shared.footer(request,response); | |
45 out.print( "\n " ); | |
46 Shared.analytics(request,response); | |
47 out.print( "\n </body>\n</html>\n" ); | |
48 | |
49 } | |
50 | |
51 } | |
52 |