htaccess? to redirect 2 different sub domains names to separate sites and servers - apache

I have a domain with sub domains setup for
wiki.domain.co.ukowa.domain.co.ukowncloud.domain.co.uk
The Wiki & Owncloud sit on Apache on a Ubuntu box. The OWA on IIS on a MS Exchange server box. Presently I am directing http to the Ubuntu box and HTTPS to the Exchange box and accessing the sites that way but this can mean entering a long URL to get to the correct location on the Apache server. In addition I would prefer all sites to be accessed using HTTPS.
Presently if I enter any of the above into a URL I go to the default page of the Web server that I am port forwarding to.
My aim would be to have it so that if I goto wiki.domain.co.uk have the traffic divert specifically to the main wiki URL e.g. "wiki.domain.co.uk/wiki/clients/login.php" and the same with the owncloud subdomain. In addition I want to divert the owa.domain.co.uk and "domain.co.uk/owa" to the MSIIS server. If possible my preference would be for them all to use HTTPS although this is not a complete necessity.
I hope I am using the correct terminology and that this makes sense. I believe I need to forward all traffic to the Ubuntu box and setup a .htaccess file to do this but I am unsure as to if this is the correct way of doing this and the settings to set or even if this is achievable.
Any help or guidance much appreciated.

Related

Redirecting IIS website to Apache website

I have IIS 7.5 and a website which currently running. I also have build a new website on WordPress running on Linux container published by Apache Tomcat.
I need to redirect the old websiteURL which is hosted on the ISS to the new site on WordPress.
Is this possible ? I have tried http redirect, but this only works locally since the new website isn't published to outside.
You are right that Http Redirect should be the solution.
https://www.iis.net/configreference/system.webserver/httpredirect?showTreeNavigation=true
if your Apache website is 'not published', I guess it will not be visible for Internet users including the IIS box. This means there won't be any way of serving your content from the Apache box.
If you are in a setup that the IIS has visibility of the Apache, but general Internet does not, then you might have a solution. This scenario can exist because of certain firewall rules. In this situation, you can set up what is called a 'Reverse Proxy' in IIS.
https://blogs.msdn.microsoft.com/friis/2016/08/25/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world-apps/

Protect home (webserver's) dynamic ip from reverse DNS issue

this is my first question here =)
I'm setting my webserver at home (trying both apache and nginx) and I've found that you can easily get and use free dynamic dns (sub) domain to make your server available not only with your home ip that would be changed next time after disconnect and connect to the internet. Actually I've made it working and it's great..
But the problem is that my personal unique data (account id/machine name) could be retrieved with reverse dns look up and I can not hide my real ip that is attached to server.
You can use proxy while browsing the internet, but how to proxy your web server (apache) that have free dyn dns (sub) domain?
I've already tried to create VirtualHost configurations, also with the use of proxy modules (mod_proxy, mod_proxy_http, mod_proxy_html) and additionally with proxifier tool, but no luck.
Some people say that it is possible to hide ip with nginx, but I never used to work with nginx. Still believe it is also possible with Apache, just can't figure it out.
I'm using private proxy in format [proxyip:port]. I must attach it everytime to my home ip to make it work. Maybe it's better to get login/password auth proxy, but at first I should find the way how to use it with web server.
Is there anyone who have luck with it? Can you explain, please, the proper config for apache? Currently I'm using version 2.4.
Many thanks and have a good day!

Accessing apache HTTP server over the internet

I have an apache HTTP server set up in my computer. Can I access it from anywhere over the internet? I don't have a registered domain for my server.
You can access it if you tell your router to forward your HTTP port. If your router does not know to forward it, you will only be able to access it on your local network. You do have to buy a domain, unless you just access the network-wide IP, you can find this on whatsmypi. So, to summarize, you need to do 2 things: (1) tell your router to forward the HTTP port, and (2) access it via the internet by means of your IP (unless you buy a domain name).
UPDATE
Of course this is one of those "easier said than done" and "one size does not fit all" things. There will probably be a set of difficulties that come along with your attempts to access your HTTP server. I would suggest googling some tutorials.

Redirecting web traffic in a server hosting both an Apache and a Glassfish web

I am hosting two web pages in my server. One is running on Apache and the another one on Glassfish. By now I solve the redirection problem making the Glassfish server to listen on a port distinct than the 80. The problem is that I think my web users have a firewall blocking those ports so they canĀ“t access the GlassFish web. Which way would you recommend me to take in order to make a URL request-based redirection? I want to make the glassfish web a subdomain of the Apache one, being both running at the same IP.
If I have not been sufficiently clear with my question, please let me know
Thank you for your time.
Have you tried modifying the domain or using subdomains? If one application is eg. at http://subdomain1.yourdomain.net and another at http://subdomain2.yourdomain.net it should do the trick without any problems. Or try http://yourdomain.net for your main program and http://yourdomain.net/somecontext for sub program. That looks meaningful also for the service user.
Tick the answer if you got help :)

404 SysVol entries in webserver's logfiles

Our 404 error logs show a lot of /SysVol http requests on our Windows Web Server 2008 for our website. It only has a webserver role and I believe that SysVol requests are meant for Domain Controllers? What's causing this and what would be the best solution to deal with these 404 requests?
I'm using code that access employee records via Active Directory (ldap) and the server is not trusted for delegaton in case this is related to the problem.
Are these requests coming from external IPs ? They are probably trying to p0wn you
The sysvol share generally gets created and shared out when a server is promoted to a domain controller. I'm assuming that your web server is not a DC and not in an Active Directory domain?
As for how to deal with it, if you're behind a firewall, you could block everything except ports 80 and 443 for instance. I hope that your webserver is behind a firewall. Seeing traffic like that isn't all that unusual considering it's on the internet.