User Tools

Site Tools


en:user_advanced:public_tomcat_win10

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:user_advanced:public_tomcat_win10 [2020/09/01 23:52] anupamaen:user_advanced:public_tomcat_win10 [2023/03/13 01:46] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Making your GS3 tomcat web server publicly accessible on Windows 10 ====== 
  
-Follow these instructions only **for briefly testing a public GS3 tomcat**, such as for the //Validating the Greenstone OAI server// section of the tutorial [[http://files.greenstone.org/tutorial/gs3-current/en/GS_OAI_server.htm|Setting up your Greenstone OAI Server]], as I'm not sure the following method is robust against potential security threats.+ 
 + 
 +====== Windows 10 instructions to make your GS3 tomcat web server public ====== 
 + 
 +Follow these instructions **only for briefly testing a public GS3 tomcat**, such as for the //Validating the Greenstone OAI server// section of the tutorial [[http://files.greenstone.org/tutorial/gs3-current/en/GS_OAI_server.htm|Setting up your Greenstone OAI Server]], as I'm not sure the following method is robust against potential security threats.
  
 ====Instructions==== ====Instructions====
-1. Obtaining your PC's public IP and LAN/private IP:+**1. Obtaining your PC's public IP and LAN/private IP:**
  
 a. Work out your PC's private LAN (local area network) IP by [[old:miscellaneous_questions#how_do_i_open_a_terminal_called_dos_console_in_windows|starting up a DOS/command prompt]] and then typing: a. Work out your PC's private LAN (local area network) IP by [[old:miscellaneous_questions#how_do_i_open_a_terminal_called_dos_console_in_windows|starting up a DOS/command prompt]] and then typing:
Line 27: Line 30:
 b. Work out public IP by visiting http://ip4.me/ or https://www.whatismyip.com/\\ It will list your public IPv4 address. Make a note of this also. b. Work out public IP by visiting http://ip4.me/ or https://www.whatismyip.com/\\ It will list your public IPv4 address. Make a note of this also.
  
-2. Configure Windows Defender FireWall to make the port accessible:+**2. Configure Windows Defender FireWall to make the port accessible:**
  
 a. Go to Control Panel > System and Security > Windows Firewall > Advanced Settings. a. Go to Control Panel > System and Security > Windows Firewall > Advanced Settings.
Line 42: Line 45:
 (Because I don't know whether outbound http responses from GS3's tomcat webserver for incoming requests need to have a port exception rule set up too.) (Because I don't know whether outbound http responses from GS3's tomcat webserver for incoming requests need to have a port exception rule set up too.)
  
-c. Now you should see the running GS3 tomcat at %%http://<private-LAN-IP>:8383%%. +d. Now you should see the running GS3 tomcat at %%http://<private-LAN-IP>:8383%%.*
  
 We need to make this visible over the public IP, which is accomplished by 'Port forwarding'. We need to make this visible over the public IP, which is accomplished by 'Port forwarding'.
  
 +* If not, check your tomcat server is running. Next, check it is listening on port 8383 by typing the following into a [[old:miscellaneous_questions#how_do_i_open_a_terminal_called_dos_console_in_windows|DOS prompt]]:\\
 +<code>netstat -an | find "8383"</code>
  
-3. Set up port forwarding:+The output should display 'LISTENING' for port 8383. 
 + 
 +**3. Set up port forwarding on your router to map to privateIP:port to public IP:port:**
  
 Login to your router (a local URL/IP that may look like ''192.168.1.1'' or similar digits) and set up port forwarding from the private port 8383 on private LAN IP to public port 8383. Login to your router (a local URL/IP that may look like ''192.168.1.1'' or similar digits) and set up port forwarding from the private port 8383 on private LAN IP to public port 8383.
  
-Remember to APPLY the configuration changes.+On some router configuration pages, you may need to remember to //apply// the configuration changes by pressing an Apply button or link.
  
 If you don't know how to work with your local home/work router, google a manual for your router's make online and search for port forwarding instructions for it. If you don't know how to work with your local home/work router, google a manual for your router's make online and search for port forwarding instructions for it.
  
-4. Now the GS3 tomcat web server should be visible at %%http://<public-ip>:8383/%%+4. Stop your Greenstone 3 server.\\ 
 +Edit your Greenstone's top level ''build.properties'' file and set its ''tomcat.server'' property to the public IP.\\ 
 +Restart the Greenstone 3 web server.\\ 
 +Now the GS3 tomcat web server should be visible at %%http://<public-ip>:8383/%%
  
-5. Once you've finished testing your GS3's tomcat web server's works correctly when public, remember to undo the Firewall and port forwarding changes to make the web server private once more.+5. Once you've finished testing your GS3's tomcat web server's works correctly when public, remember to undo the Firewall and port forwarding changes, **and** remember to return the ''build.properties'' file's ''tomcat.server'' property back to ''localhost'', to make the web server private once more.
  
  
Line 65: Line 74:
   * https://www.tomshardware.com/news/how-to-open-firewall-ports-in-windows-10,36451.html   * https://www.tomshardware.com/news/how-to-open-firewall-ports-in-windows-10,36451.html
   * https://stackoverflow.com/questions/22730420/how-to-configure-apache-webserver-to-be-accessed-by-public-domain-or-static-ip   * https://stackoverflow.com/questions/22730420/how-to-configure-apache-webserver-to-be-accessed-by-public-domain-or-static-ip
 +Perhaps useful: 
 +  * https://blogs.mulesoft.com/dev/tomcat-tcat-server/the-easiest-way-to-run-tomcat-as-a-windows-service/
en/user_advanced/public_tomcat_win10.1599004370.txt.gz · Last modified: 2020/09/01 23:52 by anupama