Well that's good news! This means it should be a lot easier to sort out the rest.
The BaseURL property is used by the XDataServer code to figure out what port to run on. In my project, it is set to either the 2001 address when working on my project, or to the 10999 address when it is finally deployed elsewhere (not on my development computer). So in the code, I have something like this:
if (GetEnvironmentVariable('COMPUTERNAME') = 'MYDEVCOMPUTER')
then ServerContainer.XDataServer.BaseURL := 'http://+:2001/tms/xdata'
else ServerContainer.XDataServer.BaseURL := 'https://+:10999/tms/xdata';
(My computer isn't called that, but that's just where its name appears).
In your case, we don't need to worry about that just yet - it is likely set to the first value above which is fine for right now.
Just as an experiment, if you wanted to try and change it from 2001 to something else, you would need to do three things, all of which have either been done for you by default, or that you've already done yourself.
- Change the BaseURL number from 2001 to something else (best go higher, but less than 65,535). Let's say for example, port 34567.
- Run the TMS HTTP Config Tool which you can find in the TMS Sparkle folder in the Windows menu. Then add whatever the link you've added to the BaseURL to this list.
- Configure your Windows Firewall to also allow the new port.
You should then be able to do the same thing previously, visiting either http://localhost:34567/tms/xdata
from the server directly or http://192.168.0.12:34567/tms/xdata
from another computer on the same network as the server.
But we don't need to do that at the moment, that's for later if you want to change the address. It sounds like access within your network is already all sorted out so
The next (last!) thing is to sort out access from outside your network. As it has been running for a while already as a web server, then it might not be too much trouble to sort out. The trickiest part is probably just actually testing it from outside your network.
Using an iPad or an iPhone or any other mobile phone that is NOT connected to your WiFi network (just turn it off if it is), then try and access the public URL of the server. So of your server is already serving up web pages on www.myfancyserver.com, you should be able to visit http://www.myfancyserver.com
from this device, and get the website that you would normally expect.
Now, try the same thing with http://www.myfancyserver.com:2001/tms/xdata
and see what you get. If you don't get the same value: [] business that you get when you visited the links previously, then something on your firewall or your webserver is inserting itself into the mix.
For the router/firewall situation, usually there is something like a port-forwarding rule that tells the router/firewall where to send traffic. So you have to allow for the port but also indicate which computer (your server) will receive the traffic. Be sure that port 2001 on the firewall is being redirected to the same port 2001 on the server computer, if that's how you've got things configured. Happy to help with router/firewall configuration stuff, but if you're stuck here, I'll need to know more about what you've got in place.
For the web server, it generally doesn't need to know about XData, so let's deal with that later if needed.
So once that is all working, then try the same thing from your local network, using WiFi or whatever. The reason I did it this way is that sometimes firewalls/routers don't like to redirect outbound requests internally. Sometimes its fine, but best to not have to troubleshoot that first.