Apache server configuration for virtual domains - apache2

I have created a website and hosted it on apache.
I add users to my website and what i want is that each user gets his/her subdomain as userA.mysite.com, userB.mysite.com and so on. I know that blogspot.com works like this but i am not able to get proper configuration.
I had used wilcard domain configuration but upon the second page again redirects to the main domain. e.g. i logged in using userA.mysite.com but after login i am redirected to my profile on mysite.com
Can someone guide on what configurations i make to get this work?
Any help appreciated.

Related

How to add a page to my website that can only be seen by an administrator?

I have a website (hypothetical) but it doesn't have any authentication. Just people can view it without registering and they can't see any login screen(There is no any Sign-Up, Sign In). But the site has a feature to add posts. That feature can be only used by the Admin. There is a special page designed for him to add posts. But Others should not be able to access that page. How to set up something like that? Without a login? Is it possible?
You could host the admin site with another port, so it is only accessible in your network. Other than that i think you'd need a login system.

Azure AD App Registration error: The reply URL specified in the request does not match the reply URLs configured for the application

Sorry that my question might be repetitive but none of the solutions provided in other links have resolved my issue. Below is my situation
We have ASP.NET Core 3.1 Web application to which we are trying to use Azure AD so that users can login with our Enterprise Credentials. We started with ASP.CRORE MVC default template and enabled to Use Organization credentials and Authentication is working in our Local environment. We are now trying to deploy this app to other internal environments. So we have deployed this to two of our internal servers and configured IIS to refer this website with http IP's assigned. I was able to create Azure App registry for this application and was able to add the http IP's through Manifest, added the clientId to the appsettings.json file and the authentication is working if we refer the website using the http IP's. I have also tried by assigning https IP's assigned to the same websites and added them to Azure App Registry and again the authentication is still working if we refer the website with either of the 2 https IP's.
Now we have decided to create URL something like https://ourwebsitename.companyname.com which resolves to either of the http IP's using F5 Load balancer. I was able to add the URL to the azure app registry and using the same clientId in appsettings.json in the same way how the app is working with http or https IPs. But somehow when we refer the website URL
https://ourwebsitename.companyname.com we are getting the error as mentioned in the title of the question and I did observed after I hit the URL, its getting redirected as redirect_uri=httpXXXX instead of https which I thought may be the reason of the issue but unable to resolve. I have googled it and tried with various solutions but none resolved and so I am posing it again hoping for a luck if someone can provide me a solution.
Following are the links which appeared close to my situation but didn't work for me
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-5.0
https://github.com/AzureAD/microsoft-identity-web/issues/115
Thanks in advance.
I looked at the sample you provided, and it does not provide the redirect_ url key in appsettings.json. So, based on my experience, it should have a built-in redirect_ url. Otherwise, the aadsts50011 error will not be reported.
To deal with this kind of problem, you can try a general solution:
When you visit the application url , you will be redirected to the login page. Decode the authorization request url, you will find redirect_url, copy the value of redirect_url and paste it into the azure portal, and try again.
For the redirect URL, it should start with https, if you need to start with http, you must configure it as http://localhost.

SaaS Application with Azure AD authentication as MS Teams App with App Studio

My company is using this service Aha! Ideas for internal idea-sharing. Everything is set up correctly with Aha! and the page site loads and requests the email for the user. Once they put it in the Microsoft credentials from the host machine so an SSO and they are redirected to the secure page. On machines where the user has not authenticated against our domain on the workstation, they are redirected to the Microsoft login and after they login, the user is redirected to the site.
So Great!! that is all working perfectly.
Now, I go into App Studio in Microsoft Teams and set up the site to load as an App in the Sidebar. I have added the main URL as a tab, I have set up the Valid Domains and included login.microsoftonline.com and I have set ADD App ID to the one used in the SAML2 setup of Aha!.
When I load the app I get the page requesting my email, this is from Aha!, and when I submit it should use SSO from Teams to log me in. I am logged in to Teams using my company Microsoft Account. At a minimum, it should redirect to the login.microsoftonline.com and request my username and password. Instead, I get nothing but a blank page.
Anyone have any ideas as to why it's not working, or what I might have done wrong?
'SSO' in the truest sense with Teams -definitely- won't work - it requires changes to the app itself, which you don't control, but even aside from that, depending on how the app ends up doing it's authentication, this still might not work, as you're seeing. Is there maybe a chance Aha! is working on Teams integration?

Setup a third party node.js authentication server

I have two separate applications (app1 and app2 based on MEAN stack) running on my server. I want to add a new application that manages the authentication for both applications. I mean if I try to log in from app1, it redirects me to a login form in auth application, and after login I come back to the previous url in app1. After that, if I go to app2, I'm still logged in.
I'm looking to implement something like similar to the google accounts/ServiceLogin: I can log in one time, and the session remains for almost all google products.
Something important is that I use subdomains for each app: app1.mydomain.com and app2.mydomain.com.
How can I do that using node and express?
Currently I use vhost to manage each subdomain.
You're looking for a single sign on solution.
I'm only familiar with one solution that Stormpath provides, which is called 'ID site'. It's basically a hosted authentication site that handles auth for you, then passes logged in users between your subdomains.
The way it works is like this:
User visits www.yousite.com.
User clicks 'login'.
User is re-directed to login.yoursite.com.
User then logs in.
User is then redirected to dashboard.yoursite.com and is fully authenticated (SSO).
You can implement this quite easily using express-stormpath, here's the relevant docs: https://docs.stormpath.com/nodejs/express/product.html#use-hosted-login

Forward naked domains

I recently purchased a domain with Yahoo Domains for my GAE app. Where I managed to get the domain mapped into my GAE account.
Now, since GAE does not support naked domains, I just placed the CNAME for www to point to Google App Engine.
Everything works fine now, i.e. my app can be accessed through http://www.my-example-domain.com
The problem is with naked domain (with Yahoo), I am trying to forward the naked domain http://my-example-domain.com to http://www.my-example-domain.com however, the domain manager is complaining that the forward is not possible.
What could be the problem that forward is not possible? Also, is there a way to solve this in GAE management console, since Yahoo domain manager seems to not able to handle this.
Hi Please try to do the following changes from your Google Apps Admin Console.
Go to this URL for Domain Management Settings in Google Apps Console.
Under the Domain Management. Click on change redirect and add www.example.com. Also check the attached screenshot for the same.
Also follow the instructions provided in the URL change A record below change redirect url.
After making these changes you will see the URL will get redirected automatically.

Resources