How could i change domain name in ubuntu? - laravel

I got 2 domains but whenever i open one of those domain, the output is my laravel project. I only want one domain in accessing the project. How could I achieve that? Im using ubuntu server in my domains. Or if possible i want to redirect the second url to the first url whenever who visits it. Thanks.
PS: There is no ect/hostname in my server and i dont know why
Domains
http://digi.propnex.net = This is the only domain that I want
https://payment.propnex.net = This one has HTTPS and I want the other one to have this https
Screenshot

Related

I need to setup one instance of Laravel to run the another application using subdomain

I don't like to modify the functioning of any of the code for example.com . After the setup
the objective is to use one instance of Laravel and have the domain/database structure of the image below and the following user interface pages.
info1.example.com
info2.example.com
info3.example.com
these all are run from example.com. Like example.com main domain run info1.example.com, and other's also run different address from example.com. how can i do that?

How to load an codeigniter application by using different url

Now I am developing an application by using CodeIgniter framework. In this application, there is a section which name account setup. By using this section we can create multiple accounts. As an example, accounts name are abc, bca or anything. And Suppose my site URL is: www.xyz.com (base_url) Then we need to access the site by the domain name and also domain name with account name like bellow:
www.xyz.com
www.xyz.com/abc/
www.xyz.com/bca/
www.xyz.com/anything/
For More clear, URL pattern will be:
www.xyz.com/dashboard/index
www.xyz.com/abc/dashboard/index
www.xyz.com/bca/dashboard/index
How can we do it? I need your suggestion.
Yes it's Possible through codeigniter Routs.
Go to application\config Open a file which Name is routes.php
you can call the controller functions see in code example
example
$route['new_project'] = "controller/function";
when you hit your website url like this www.xyz.com/new_project it will go to your mention controller and function.
see the documentation of routs CodeIgniter URI Routing
example 2:
$route['account/(.*)'] = "controller/function";
Now we you redirect your url like this
redirect('account/'.$name_var.'');
Now your url look like this.
www.xyz.com/account/name_of_logged_in_user
Also you can use this like this.
$route['(.*)/dashboard/index'] = "controller/function";
And then you can call it like this.
redirect(''.$name_var.'/dashboard/index');
And from this code your output url show something like this.
www.xyz.com/name_of_logged_in_user/dashboard/index
Hope it will help you if any question add comment
There are many way to do it.
1) Domain alias if you want to run same script with different domain.
2) if you want to run same script with sub domain then you can do it from Cpanel
3) If you want to run same script with different folders in same domain then you need to use htaccess

Set up multiple laravel apps on nginx server

I want to create a config file on my nginx vps to handle 2 laravel apps. I don’t own any domain name.
What I want is:
http://my_ip/app1 will resolve to the first app
http://my_ip/app2 will resolve to the second app
and if anyone tries to access the root http://my_ip/ to show a 503 or a custom html file.

Magento Front-end "404 Not Found 1"

Situation:
We have a domain name pointing to our old windows server. We purchased a linux server. I wish to build our new webstore on the Linux server. Once I am ready, I will redirect our domain name to the Linux server.
Up to now:
We have Magento installed on the back end. Now I need to have the front-end working
Problem:
I edited the url to be our domain name. I have edited my host file to have the domain name ignore the windows server ip and get directed to the linux server (the one with Magento installed). The page shows up with links and text in a big mess, and the title of the web page says "404 Not Found 1". I get this problem with both the back-end & the front-end.
Thinking:
I am able to access the PHPadmin and edit the url. I tried making the url the Linux server's IP. If I do that, Magento's back-end works but then I get a completely blank page for the front-end. Any suggestion is welcomed.
To make your site visible:
1) Change the links web/unsecure/base_url and web/secure/base_url of the table core_config_data to http://www.yourdomain.com/ or whatever you have.
2) Go to app->etc->local.xml and change your database username,password, host to the right one.
3) if it is still not working go to var and media folders and change the permissions to 777 for all folders and subfolders.If it works you know it is permission problem.
Read this after that and make your decision magento permissions

Routing a url to fetch content from another site

Environment: IIS 7.
I have a default site www.domain.com. Folder C:Inetpub/wwwroot/domain
There is subdomain www.subdomain.domain.com. Folder C:Inetpub/wwwroot/domain/subdomain.
Now, I have set up a new website at an external server, say www.newdomain.com. I cannot host www.newdomain.com on the same IIS server (as mentioned above) due to some constraints.
In this setup, how do I get www.subdomain.domain.com/blog to show all the content available on www.newdomain.com while preserving the URL as www.subdomain.domain.com/blog
How could this be achieved in IIS 7?
You would have to put the entire www.subdomain.domain.com on the other server. You can't put just the /blog path somewhere else.
How would any client know to go to that other server for /blog if the DNS for the subdomain points to the first server?
Alternatively, you could create blog.subdomain.domain.com for the blog server.
Possible approaches:
Host the new website as blog.domain.com with the actual content hosted on a different server (not the same IIS server as domain.com)
Set-up a ProxyPass on subdomain.domain.com/blog to the new website. I know how do to this on Apache (via mod_proxy and ProxyPass), but not sure how to do this with IIS. Probably ARR can help you.
I was finally able to do this by reverse proxy rewrite rule. For those who have similar trouble here is the solution:
Go to the site node hosting www.subdomain.domain.com and click rewrite rule. If ARR is not installed the IIS Manager will ask you to install it. After installing ARR close and reopen the IIS Manager.
Open the rewrite rule window. There will be a dialog asking to allow reverse proxy to servers outside your server farm, accept that. In the Inbound rule enter www.newdomain.com. In the from input of the Outbound rule enter www.newdomain.com and in the to input enter www.subdomain.domain.com. click apply changes.
This will route the entire www.subdomain.domain.com to newdomain.com. What you need is to route only the /blog link.
To do this go to rewrite rules and select the rewrite rule you just created. Click edit and in the match section in url input change (.asterix) to ^blog(.asterix). This will apply the rule to route only the /blog.
That all. test your routing in the browser, if everythings fine this should work.

Resources