Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: ahartwig on May 01, 2009, 05:52:11 AM
-
I have a ADSL connection to the internet with DHCP assigned dynamic address. The modem routes to a firewall/router with the SME system (server only) in a DMZ. The ADSL modem does port forwarding on port 25 (SMTP) and 80 (HTTP) to the SME system. I run ddclient on the SME system to update my dynamic IP address on dyndns.com.
The firewall router acts as DNS server for my "local" network which I have called example.org.
The review configuration web page shows primary domain example.org and virtual domain xxx.dyndns.org
I have created an i-bay test to be accessed from the internet and local network.
I can access the test i-bay locally by http://sme.example.org/test but if I attempt to access the test i-bay from the internet (lynx from a system to which I've telnet'd) I get The requested URL /test was not found on this server.
I've looked in /etc/httpd/conf/httpd.conf and see the following fragment:
<VirtualHost 0.0.0.0:80>
ServerName example.org
ServerAlias ftp.example.org mail.example.org proxy.example.org sme.example.org wpad.example.org www.example.org
DocumentRoot /home/e-smith/files/ibays/Primary/html
ScriptAlias /cgi-bin /home/e-smith/files/ibays/Primary/cgi-bin
Alias /files /home/e-smith/files/ibays/Primary/files
# test ibay (just 4 testing)
ScriptAlias /test/cgi-bin /home/e-smith/files/ibays/test/cgi-bin
Alias /test/files /home/e-smith/files/ibays/test/files
Alias /test /home/e-smith/files/ibays/test/html
but in the fragment for server name xxx.dyndns.org there are no Alias entries for /test
It appears i-bays are only accessible from the internet IF they are on the primary domain. Correct? Is that intended behaviour?
-
Correct? Is that intended behaviour?
AFAIK yes, but you can assign a ibay to a virtual domain.
-
AFAIK yes, but you can assign a ibay to a virtual domain.
Yes, but it seems there is a one to one association between ibays and virtual domains.
Hence, if I have an ibay test I can access it as http://sme.example.org/test (because the host name is configured as sme.example.org) but the only way to access it from the internet is to create a virtual domain (e.g. xxx.dyndns.org) and associate that with the ibay in which case I would access it as http://xxx.dyndns.org. For every additional ibay I want to access from the internet I need to create an additional virtual domain. This is easy enough if I register with dyndns.com because they provide optional wildcard domain names but other free DNS providers (e.g. no-ip.com) don't provide wildcard domain names.
For my purposes I suspect I can get what I want by changing the configured name of my system from sme.example.org to xxx.dyndns.org (or xxx.no-ip.com).
I've been through the documentation (Administration Manual) and can't find anywhere that calls out the fact that ibays can be accessed by http://hostname/ibay-name only if hostname is the configured local hostname and NOT if hostname is an additional "self" hostname configured through the Domains and Hostnames and addresses panels in the web GUI.
If the current behaviour is to be preserved then I think it would be useful for the Hostnames and addresses panel to mark the "primary" hostname specially since the the current display gives the impression that all the self hostnames are equivalent, but they are not equivalent when it comes to web access to ibays.
I came to my current configuration with dual names by initially setting up a server only system on my locally network. Then later, when I wanted to access it from the internet, I added another domain and self hostname for the internet access rather than go through the console configuration dialogue again to change the local hostname and domain.
-
ahartwig
I'm not sure I fully follow what you want to do.
Rather than pointing your secondary virtual domain at a specific ibay, you can just point the virtual domain at the primary ibay.
That way the virtualdomain.com will resolve to the content in the primary ibay. You can then access your ibay using
virtualdomain.com/ibayname
There is another trick you can do when a specific name is already used for an existing user, group or pseudonym, where you create subfolders in the ..../primary/html folder and then create a index file in those folders that redirect to wherever you want eg an ibay.
-
Rather than pointing your secondary virtual domain at a specific ibay, you can just point the virtual domain at the primary ibay.
OK, I've done that in the Domains panel of the web GUI:
xxx.dyndns.org is "virtual domain" associated with Primary ibay.
example.org is the domain configured during console configuration and sme is the hostname configured during console configuration.
I've created an additional ibay test. I can access test by http://sme.example.org/test. I can't access test by http://xxx.dyndns.org/test (the browser reports The requested URL /test was not found on this server.).
Maybe I didn't understand your suggestion.
-
ahartwig
I can't access test by http://xxx.dyndns.org/test (the browser reports The requested URL /test was not found on this server.).
Yes that behaviour is correct, sorry to mislead you.
-
ahartwig
The simplest approach is to rename your main domain using the server console, then access your ibays using the maindomain/ibayname URL as desired.
All settings will be retained, so it is safe to do.
Alternatively point your main domain at an ibay (rather than primary), and move your other ibay content into subfolders in that main ibay.