Page 1 of 2

Proposal: URL addresses to replace ports

PostPosted: Thu Jan 03, 2013 7:47 pm
by mdi
Hi,
would it be possible to set a specific URL to each service, so that the service could be addressed from port 80 instead of a specific one?

The original Lacie firmware can be accessed only from port 80, which simplifies accessing the device, especially if using a dynamic DNS service.

In my case, I'm behind such dynamic service and I'd really like to access the transmission client, or, now, the camera, from the internet, but I cannot define many addresses and having them associated with different ports.

It could help to have each service under a specific name, like http://nas-ip/transmission or http://nas-ip/motion, etc.
Similar like you've already done with the web-explorer.

That could help also accessing all the services from the office, from which I am allowed to exit only for web traffic on port 80.

Great firmware anyway! :) Still glad of it so much! :rock

Re: Proposal: URL addresses to replace ports

PostPosted: Thu Jan 03, 2013 9:25 pm
by Jocko
Hi mdi,

In principle, I do not think it possible: one application per port. (it's a basic TCP rule)

In the current firmware version, some features use the same port because it shares the same demon. This is the case for the web interface firmware, webdav and webexplorer because all three use the apache server. All other features using various demons and so they have specific ports.

Today, only torrent-flux could be added instead of using a virtual server, it is possible to use an alias.

In the original version, if I remember correctly, for example, you do not have direct access to the transmission-cli interface but using a sub-menu in the main web interface.

Note: it is amazing that you can not also use port 443 which is in principle always open to allow url "https://".

Note1: I strongly recommend not using WAN access on port 80: all data sent over the WAN are readable by a hacker. For example, the administrator from your office can know what you do and get your login! So use access on port 443

Re: Proposal: URL addresses to replace ports

PostPosted: Thu Jan 03, 2013 9:32 pm
by mdi
Thanks, precious infos :)

Anyway, yes, they also open port 443, but they don't allow to use others, like 8080 for example.

Re: Proposal: URL addresses to replace ports

PostPosted: Thu Jan 03, 2013 10:16 pm
by Jocko
if you want, I can send you a patch where torrent-flux is available via the url : http(s)://nasmane/torrentflux or http(s)://yourDDNS/torrentflux.

Note : by causing the upgrade to php 5.4.7, we had to do several fixes for this torrent client but now several features are restored like the search engines

Re: Proposal: URL addresses to replace ports

PostPosted: Fri Jan 04, 2013 10:23 am
by Mijzelf
Jocko wrote:In principle, I do not think it possible: one application per port. (it's a basic TCP rule)
Most webservers support a 'proxy' mode. For instance, for lighttpd:
Code: Select all
$HTTP["url"] =~ "^/transmission($|/)" {
                proxy.server = ( "" =>
                        ( (
                            "host" => "127.0.0.1",
                            "port" => 9091
                        ) )
                )
        }
When accessing the server as http://nas-ip/transmission, you get the page served from localhost:9091.

Re: Proposal: URL addresses to replace ports

PostPosted: Fri Jan 04, 2013 10:32 am
by rafesl
Apache has a ProxyPass module which does similar work.

Re: Proposal: URL addresses to replace ports

PostPosted: Fri Jan 04, 2013 10:41 am
by Jocko
Hi Mijzelf,

I know this method but currently we didn't include the proxy module with the apache server.
For the small devices (nwsp1 and SPD8020), there is already a memory used size issue and to use the Httpd server can down the performance.

But maybe we must test this way

Re: Proposal: URL addresses to replace ports

PostPosted: Fri Jan 04, 2013 10:44 am
by Mijzelf
In that case I can recommend lighttpd anyway, as it's resource use is significantly lower.

Re: Proposal: URL addresses to replace ports

PostPosted: Fri Jan 04, 2013 11:07 am
by Jocko
As you propose,with the last apache upgrade I begin to think to use lighttp instead of httpd would be better.
But change to http server means much work, I prefer first to begin to test how the apache server behaves by addind the two proxy modules because few changes must be do in httpd conf file.

Re: Proposal: URL addresses to replace ports

PostPosted: Sun Jun 23, 2013 11:10 am
by favroom
Jocko wrote:I prefer first to begin to test how the apache server behaves by addind the two proxy modules because few changes must be do in httpd conf file.


Do I understand correctly that I can start using apache proxy mod by changing the httpd conf file? Or do I need a patch to add these proxy mods first?

I found two httpd.conf files on my NWSP 2:
/usr/conf/httpd.conf
/etc/httpd.conf