Need help in pointing application in the default website to have a domain name - windows

How to add an IP address to the virtual directory in IIS, for example i have pointed the domain name to the default website and it is pointing correctly, the issue i would to have a domain for the defaulvirtualdirectory/application(ex:www.xyz.com/abc) to have a domain name http://abc.def.com.
I tried all the possibilities like HTTP redirect but the problem is it is pointing to the default website instead of application.

If you want to have website URL like http://abc.def.com to load web-contents of sub-directory e.g WWWROOT/application, you should add another subdomain website http://abc.def.com with documentroot as WWWROOT/application. The primary website(http://def.com) will load web-contents of WWWROOT and subdomain website(http://abc.def.com) will load webcontents of WWWROOT/application directory. You can also point subdomain website to different IP address if you want.

Related

Laravel website behind the reverse proxy and subfolder?

I have a Laravel website with LAMP stack and host on a ec2 server. I setup the Virtual Host configuration for the host name www.abc.com and it works fine. One day, The client said they want to use their domain to visit the website like www.client.com/abc. They use the reverse proxy to point our ec2 server. The first problem we met is the virtual host has failed and we fixed it by adding server alias setting.
ServerAlias www.client.com
The url has connected to the server correctly and the second problem is coming up. Because of the subfolder of the url www.client.com/abc, all the assets paths are failed. For example, we had fonts, styles and js paths that generated by laravel-mix:
{
"/js/app.js": "/js/app.js",
"/css/app.css": "/css/app.css",
"/js/login.js": "/js/login.js"
}
Those paths are absolute and it turns to 404 found on the website if we use the mix() helper function to load assets. The rendered url on the blade pages are wrong.
It would be
http://www.client.com/js/app.js
instead of
http://www.client.com/abc/js/app.js
And the fonts loaded from the vendor and styles, which use the relative paths and are converted to absolute as well. So we had to workaround this by adding the option processCssUrls: false to webpack.mix.js.
The third problem is the redirection when user logs in out. The defaults redirect url is /. I know we can change the redirect urls in middleware and controllers but it feels like so much workaround over this. Is there any better way to solve those problems?
To declare the question again, how to setup a Laravel project behind the reverse proxy with subfolder?
http://www.example.com/laravel

I can't access to my website hosted on OVH (The requested URL / was not found on this server)

I have a website hosted on ovh.
I'm uploaded the source files in www directory and now when i try to access to my home page website i have this error : The requested URL / was not found on this server. In the www directory i have an index.html file.
Can you help me please.
Make sure that your hostname is pointing to the right folder.
For OVH, you usually need to check the "Multisite" or the "Subdomain" settings to configure on which folder the user lands, depending on the (sub)domain.
For OVH webhosting, each domains or subdomains is handle by a "multisite". You can setup a different folder for each multisite.
Did you check your multisite is setup for your "www" folder?

How can i use multiple url eg. www.example.com,www.example1.com,www.example2.com, to point same project directory?

I want to use different view along with data for different URL . For example use view1, view1, view2 for www.example.com, www.example1.com and www.site2.example.com respectively.I have managed this making server alias in wamp. How can i do this in real hosting. e.g my registered domain is www.example.com
When you create URLs like "Site1.example.com" or "site2.example.com", you are effectively creating sub-domains on the server. Each sub-domain require separate deployment/installation (unless, you have enabled wildcard setting in sub-domain where all the domains are pointing to single sub-domain/address).

point subdomain from website-1 to subfolder on website-2 (both hosted on the same server)

I have a client with three websites, each with separate c-panels for their hosting and dns management.
I need to point a subdomain from website-1 and website-2 to website-3, and then have their root be a subfolder on website-3.
I was able to set up a simple subdomain for website-3, and set it's root to the subfolder that I needed, but am having trouble pointing the other two sites.
It seems (from googling around) that the issue is caused by the site's all sharing an IP address, since they're all on the same server.
On website-3 where the subfolder is, I've tried setting up an "add-on domain" of test.website-1.com but get an error stating:
website-1.com is already configured. Sorry, that domain is already setup (remove it from httpd.conf)
I get a similar error trying to use the park a domain settings in the cpanel. I don't have access to the server in a way that lets me httpd.conf (unless there's a way through the cpanel).
Is there any other way to set this up that I'm missing?
If you are using IIS, you can create a website (Add Web site under Sites folder in IIS) in IIS and point to any folder. For example, if you are trying to point a subdomain mysubdomain.website-1.com to a particular folder, create a website in IIS that points to that subfolder, then in bindings, bind it to mysubdomain.website-1.com. In your domain registry, simply point the sub domain to the same IP of Website-1. I believe that should work.
Unfortunately, my knowledge is limited to IIS. If you are not using IIS, you may find other resources to configure a subdomain.
If all your primary domains are using same IP , you will not be able to point the subdomains as you have mentioned since all the subdomains also using the same IPs.
Instead of pointing the subdomain 1 subdomain 2 to subdomain 3 ... just set up redirects directly to subdomain 3 for each subdomain from their primary domain's cpanel.
You can easily set the redirects from Redirects option in cpanel

Trouble accessing a custom form on magento(multiple website) from url

I created a custom web form for a magento website, on a local server which has only one website setup, i could access the form using the URL but when i upload the module to the server which has multiple website setup, i cannot access the form using the URl ,
for e.g on my local server i could access the form as
http://localhost/cars/index.php/surcontest-contest
but when i upload the module e.g dev.test.org on the server(it has multiple website setup, more than 50 sites ) i could not access the form
http://dev.test.org/surcontest-contest (gives me a 404 error)
how would i access the module, how would i find out about the url to access the form.
Any help will be greatly appreciated.
Thanking you in advance.
1) clean cache to make sure that module installed (check it in admin or database)
2) check that url rewrites enabled and works (can you access some category or product page without index.php ?)
If your default URL is http://www.test.org/ then to access multiple sub domain you should enable from your domain panel by providing host stetting
Hostname=*.test.org, address=, Record Type=A(address)
Also, on your server add sub domain dev.test.org.
It will create dev folder in the public_html folder in file manager.
You should copy index.php and .htaccess file in that follows the magento multiple web site steps see the link
http://inchoo.net/ecommerce/magento/how-to-set-multiple-websites-with-multiple-store-views-in-magento/

Resources