Community Forum

Mansoor
Mansoor
Offline
Resolved
0 votes
Hi,

I'm running clearOS 7.3 CE in gateway mode and having a problem with accessing web flexshares via their Alternative Server URLs (subdomains). A subdomain for flexshare is only accessible if I add it as an alias in the DNS Entry page. I don't think this is how flexshares subdomains supposed to work. They should be accessible without being manually added to the DNS server, shouldn't they?

I hope someone can point me to the right direction in order to over come this issue.

By the way, the full flexshares URLs, e.g. http://xxxxx.lan/flexshare/yyy, are working well.

Thank you.
Saturday, September 09 2017, 11:40 AM
Share this post:
Responses (4)
  • Accepted Answer

    Mansoor
    Mansoor
    Offline
    Saturday, September 09 2017, 02:12 PM - #Permalink
    Resolved
    0 votes
    I reviewed the virtual host settings and they seemed right to me, specially since the following portion just properly work:
    ScriptAlias /flexshare/dm/cgi-bin/ /var/flexshare/shares/dm/cgi-bin/
    Alias /flexshare/dm /var/flexshare/shares/dm


    I went on and changed all domain, host, default domain, server name, etc. in the webconfig. Now everything work pretty well, including the flexshares subdomins :)

    [EDIT]
    What I did exactly is the follwoing:
    Changed domain.lan -> domain.com
    Added:
    address=/domain.com/192.168.0.1
    to /etc/dnsmasq.d/local.conf
    I did this because domain.com is actually served by the clearOS server by DynDNS.
    [/EDIT]
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, September 09 2017, 01:19 PM - #Permalink
    Resolved
    0 votes
    I am not so familiar with the virtual host set up and don't have one on my machine and I don't have the time to test, unfortunately. Virtual hosts are set up in /etc/httpd/conf.d/flex-80.conf and flex-443.conf. Can you post the flex-80.conf? But I don't know what I am looking for. It may just be easier to give up and use the hosts file (Webconfig DNS Server)
    The reply is currently minimized Show
  • Accepted Answer

    Mansoor
    Mansoor
    Offline
    Saturday, September 09 2017, 01:04 PM - #Permalink
    Resolved
    0 votes
    Thank you Nick.

    I did what you suggested, but now every subdomain points to the page in the main domain only. In other words, xxxxx.lan/flexshare/yyy goes to the flexshare, while yyy.xxxxx.lan goes to the main website.

    May this be an apache (httpd) problem?
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, September 09 2017, 12:44 PM - #Permalink
    Resolved
    1 votes
    Internally I'd expect you to have to add every subdomain to the DNS entry page. This populates the /etc/hosts file which does not support wildcard entries. There may, however, be an alternative. In /etc/dnsmasq.conf or better still, in a file of your own in /etc/dnsmasq.d/ make an entry:
    address=/xxxxx.lan/192.168.0.1
    Obviously change xxxxx.lan to your LAN domain and the IP address to the ClearOS LAN address. Once you've made the change, restart dnsmasq with a "service dnsmasq restart".

    [edit]
    Having said this, I don't know how this then leaves your other entries in the hosts file. I don't know if the hosts file entries are used or if you always get your ClearOS LAN IP returned. You'll have to test that
    [/edit]
    The reply is currently minimized Show
Your Reply