Forum archive
LAMP How do I use local IPs as subdomains?
I'm running a TKL LAMP with a TLD on ESXi (10.0.0.10) and this is what I try to do:
10.0.0.30 port 8081 -->sickrage,example,com
10.0.0.30 port 40000 -->utorrent,example,com
(Mollom won't let me use . )
And many more of these.
I have tried every solution i have found, but it just won't work.
DNS is correctly setup with GoDaddy and I can ping the created subdomains. They now show contents from TLD.
How can I make this work?
Please do a "for dummys" version and start with a clean install.
How are you trying to configure it? Personally I much prefer commandline. I find the Webmin config a little confusing.
As for specific config, what exactly are you trying to do? I can think of a number of ways to achevie something like what you are after. You could set Apache to redirect or rewrite the url, something like this:
http://sickrage.example.com -> http://sickrage.example.com:8081 (and serving 10.0.0.30:8081)
Apache docs are here: http://httpd.apache.org/docs/2.4/mod/mod_alias.html I've never used it like this but a rewrite should probably work too? https://httpd.apache.org/docs/2.4/rewrite/remapping.html
Or you could set it up as a reverse proxy, so
http://sickrage.example.com will actually display what you would see at http://10.0.0.30:8081
https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html
Sorry it's not even close to a "for dummys" explanation. Unfortunately I know Apache much better in theory than I do in practice.
Keep in mind that Debian (the basis of TurnKey; also the basis of Ubuntu) arranges the config files differently to upstream Apache (and other OS like Red Hat - they use a single monolithic config file; in Debian it's split up).
For starters I'd create/adjust the site config within /etc/apache2/sites-available. The file must have a .conf extension. E.g. you might want to put each in their own site file /etc/apache2/sites-available/sickrage.conf etc.
Then disable the default site, enable your new one and restart apache so it uses the new config:
Then once you've configured it, you need to enable it.
Once you have decided how you want to do it. You should find plenty of info via Google. Just keep in mind my comments above (debian/ubuntu examples should be good). Also note that TurnKey v14.x (Debian Jessie) uses Apache v2.4. So older info (for Apache 2.2) may not work properly (or at all).