Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have an internal apache webserver on our LAN, named castor.foo.bar. The server provides access to documentation areas and user's home directories on castor.foo.bar.
I wanted to make this server available from the internet safely, so I redirected port 80 to port 443 on castor.foo.bar by stunnel, and forwarded port 443 of castor to port 443 of our internet firewall machine mail.foo.bar (we have only this one domainname registered).
I can connect to the webserver using https://mail.foo.bar/, and I can view any documents in and under the server's document root directory, but I have problems with links pointing out of the document root directory of the server: when clicking to such links, I get errors like 'castor.foo.bar not found'.
This is the case e.g. when I try to connect to user's home directories. (https://mail.foo.bar/~username)
I know this error is due to the fact that I connect to the server using URL https://mail.foo.bar/, while the apache server knows itself as castor.foo.bar.
If possible, I want to avoid advertising castor.foo.bar as a registered domain name on the internet, i.e. I would prefer further using URL mail.foo.bar.
Do you know a workaround, maybe an apache configuration option addressing this situation?
Meanwhile I found that the problem is more serious: browsing any directories even in the document root gives the same error message (castor.foo.bar not found).
Entering the following URL from within our LAN shows the contents of directory /usr/local/www/Web/documents in server castor: http://castor.foo.bar/documents/
Since the document root is /usr/local/www/Web for both virtual servers (castor.meei.hu and mail.meei.hu), both URL should point to the same directory.
From the outside, I can only view html files, and documents to which a relative link points from a html file.
Any html pages auto-generated by apache, like contents of a directory, even if within the document root path, fail to show up if requested from the outside.
I am sorry to mislead you (and myself), but the problem turned out to be due to missing trailing slashes when typing in the URLs of directories.
I was misled by the error message: 'unknown machine: castor.foo.bar' which did not help me in the right direction.
Anyway, thanks for you kind attention.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.