Remote access to Lucee

#1

I am developing a web-based project on a Windows computer in my home network and am using the built-in Tomcat Server. I would like another Windows computer in my home network to be able to access and run my project. How do I achieve this?

0 Likes

#2

Would it be possible to create a windows share on the first computer, so you can access the webroot from the other one?

0 Likes

#3

Thanks Micha11 but I guess that’s not the way you’d do it in production, so there must be a better way. I imagined I would somehow tell Lucee via the management interface but there doesn’t seem to be an option to do that.

0 Likes

#4

do you mean access the web server, like 127.0.0.1:8888 ? just swap 127.0.0.1 for the machine’s name or ip address, you may need to reconfigure the windows firewall to allow access to port 8888

0 Likes

#5

Question is do you want to access it via IP or hostname ?
Using hostname:

  1. On windows host machine setup an IIS site myproject.com to point to your lucee project folder.
  2. Find your main machine’s IP4 address using ipconfig
  3. Change windows adapter settings to always assign the same IP
  4. Add your site myproject.com to your windows host file pointing to the above IP

Other machine:

  1. Add the same hostname (myproject.com) to your host file to point to the host machine’s IP address
  2. You may need to add the port number on the end like myproject.com:8888 although it can be configured without
  3. As Zac said above you need to reconfigure the windows firewall to allow access to port 8888 or even just turn off private network ( not the public one)

Hopefully I haven’t missed anything…hope it helps

0 Likes

#6

I was hoping to make this work using the existing Lucee/Tomcat Server and the Firewall was the key. I turned off the private Firewall and then I could connect. Added an exception to the private Firewall and all is good. Thank you both for the assistance.

0 Likes

#7

I’m confused again. I thought my Firewall exception was working but it seems not. What exception should I be adding?

0 Likes

#8

I don’t really understand what you are trying to do. Do you want to host Lucee with tomcat on your development windows machine, and then access it with a browser on a second machine of your home network?

0 Likes

#9

I am able to connect to my application from another computer in my local network using a browser but it requires me to turn off the private network. My question is what exception do I need to add to the Firewall to allow this browsing computer through?

0 Likes

#10

In Windows 10 (I don’t have an English OS… I’m translating it directly from my german machine, maybe the names are little bit different),

On the machine with Tomcat go to the “Advanced Settings” of your Firewall. Click on -> “Inbound Rules” -> Click “New Rule” on the right side of the window -> as Rule Type Select “Port” and “continue” -> As Protocol select “TCP” and add as Port Number “8888” and “continue” -> Select “Allow Connection” -> “Continue” -> “Continue” -> Give a name to the Rule. Example: “HTTP TOMCAT PORT 8888” and give a descripton and “Finish”.

To tighten the rule a little more you can edit the just created rule, edit it by double clicking it and then e.g.

  1. change the “Range” of remote IP adresses to the ones of your Home-Network if wanted.
  2. Allow only the programm/service of Lucee for that rule if wanted.

Just play arround, and you’ll see.

That is Windows 10 related, for more information google around a little, you’ll find some good tips e.g. :https://www.online-tech-tips.com/windows-10/adjust-windows-10-firewall-settings/

0 Likes

#11

Slightly OT, but Ngrok is a cool utility to expose a local webserver to the web

0 Likes

#12

I assume the port it’s binding to is local host which is not accessable externally. Using CommandBox, you’d just do something like

server set web.host=0.0.0.0
server start

and you’d have a server anyone on your network could hit by hitting your machine’s IP directly. Or, the Ngrok route is also easy on CommandBox:

install box-ngrok
server share start

A browser window will pop open with your temp Ngrok proxy URL.

0 Likes

#13

Didn’t know Ngrok!!! Suggestions like this I always appreciate a lot. Thanks.

0 Likes

#14

Andreas, excellent! Thank you very much!

1 Like