Files uploaded to hosting service don't appear on domain root - hosting

I recently paid for a domain and hosting services through two different vendors. I pointed the domain to the IP provided by the hosting service, uploaded my HTML through Cpanel to the public_html folder in file manager but the page does not load when I point my browser to the IP or my domain. Instead, I have to type in the IP or my domain and add /~MyUserName
Is there something I am doing wrong? I can't access a higher level of folder in file manager than /~MyUserName. Do I need to point my domain to the IP/~MyUserName?
Thanks in advance
File Structure

Related

Internal IIS web site to URL

I have installed a web site on one of my servers within our active directory domain. How do I create an actual URL such as http://TheWebApp instead of having users navigate to http://192.168.0.xxx/TheWebApp?
Thanks,
Chris
You can add 192.168.0.xx and WebApp to hosts file in local machine. Then set the application as an independent site on server and bind to localhost:80. When you enter the http://WebApp in local machine, it will forwards to http://192.168.0.xx and points to the site on server.
Or you can buy a public domain and bind it to your server, then bind site to domain.

Can not connect domain with Laravel Forge

I created a domain with GoDaddy, and connected it with Digital Ocean.
I think the domain connected exactly to Digital Ocean.
In Laravel Forge, I made an app with that domain, and deployed my GitHub project.
The problem is, if I visit my website, it is showing just the "Welcome to nginx!" page. How do I make it display the code I wrote?
If you deployed your application in default directory, then setting up the domain DNS records should point to you server ip address and your website should be accessible from both server ip address and the domain.
But if you deployed your application in a different directory rather than the "default" you need to change your DNS records for pointing correctly to application directory.
You may want to take a look at Laracasts Deployment tuts for Laravel Forge
a basic tutorial by Jeffery Way: https://laracasts.com/series/build-and-configure-a-staging-server/episodes/1
a newer version for working with Laravel Forge by Marcel Pociot: https://laracasts.com/series/learn-laravel-forge/episodes/4

How to Redirect Route 53 subdomain to subdirectory of your website

I have a domain on Godaddy and using amazon Route 53 hosting. I want to create a subdomain and make it point to a subdirectory in my site. How is it possible?
I Have Tried
Using S3 bucket, but s3 settings say host a static site. My site isn't static so I believe that option won't work
I have added a subdomain on route 53 with the help of this article
How do I create a subdomain for a domain hosted through Route 53?
and then changed my server settings to make new domain point to a subdirectory using this answer
How to point domain name to Amazon EC2 subdirectory. But it didn't work. Web page shows DNS server not found
Any kind of help will be appriciated. Thanks in advance.
DNS resolves a domain name to the IP address of your server. It only resolves the first part of a URL that defines the server -- it is not involved in the remainder of the URL.
For example:
http://example.com/path/index.html
DNS converts example.com into the IP address of the server. The request for /path/index.html is then sent to port 80 of that server.
Therefore, it is not possible to configure Amazon Route 53 (nor any DNS server) to point to a subdomain of your site.
You could, however, configure your web server to recognize requests going to different domain names and serve different content to the user. For example:
http://images.example.com/foo.jpg
DNS will resolve images.example.com to the same IP address, but the web server can notice that the original request was to images.example.com, so it should serve a different set of content, or content from a desired subdirectory. This configuration would be done within your web server. If that's what you'd like to do, please consult your web server documentation or search the web for that topic.
I had the same issue.
The solution was for me to set the load balancer (Application Load Balancer) as target for sub.mydomain.com and then in the load balancer listener rules, add a rule for the subdomain (as host header value) with a redirect.

make subdomain on IIS point to specific folder on other server

i have a domain that i have full access to the IIS, and it hosts the main website.
i want to make a subdomain retrive files from another server (Media Temple grid hosting), in an specific path.
for example:
mysubdomain.domain.com (my IIS server)
get files from www.otherdomainandserver.com/sites/comunidade (Media Temple hosting)
i was able to set the IP address on the A Record, but i can't point to the correct folder that has the files, the specific path.
any thoughts on that?
thank you very much.
Under your main domain's (domain.com) website right click and add new "Virtual Directory".
On Add Virtual Directory dialog give whatever name (mysubdomain) you want to give in "alias" field. In physical path field give network folder's path and click ok.
Right click on Virtual directory created in step 2 and select "Convert to Application"
Make sure that app pool identity under which your subdomain app is running has at least read access to network folder.
Remember you can not map your subdomain application's physical path to virtual path from some other application's virtual path i.e.(www.otherdomainandserver.com/sites/comunidade). It has to be physical path e.g. \\myotherserver\myfoldertomap
I have found another way and that is less technical but let me share with you hope that will solve your problem.
Domain which you want to park to another server subfolder need to change the dns with another server DNS and addon that domain to the server where you want to point...while doing the addon process your cpanel would ask where you would like to point the directory and save this...BINGO the work is done you domain is pointed to another server directory.

Ensuring folder name doesn't show up in the domain name

our hosting account is set up with the domain www.nashman.ca, and our application is at www.nashman.ca/hub. We have another domain that forwards to www.nashman.ca/hub and that's hub.mhn.co. The problem i'm having with this is that the forwarded domain adds on the /hub whenever you navigate to another page from hub.mhn.co, so the domain shows as hub.mhn.co/hub/admin when you're in the admin area, for example. I need the domain to stay consistent, and never show that folder name, because its breaking some of the javascript I use. What is the best way to set this up?
edit
I've been doing some reading about URL Rewriting, and looking into it - my hosting provider supports the IIS7 URL Rewrite module. All the tutorials I've found so far detail how to set up rules using the IIS config tools, but I don't have access to them. Is there a way to do it by editing my web.config in my apps root directory? And will this solve my issue?
Is the default page for hub.mhn.co using a redirect to www.nashman.ca? If so, what is happening is that the forwarding software basically returns a new URI that the browser requests, and the new URI will replace the old one in the browser window and thus in all future requests. You're probably redirecting to ~/hub/ (the hub subdirectory of the site root) which will result in the browser requesting a new URI that keeps the domain name but tacks on the subdirectory.
If you have direct control over the DNS and your webservers, you can use the DNS configuration to direct a request for the hub.mhn.co domain directly to the /hub subdirectory of your webserver. That way, the browser never knows that hub.mhn.co is actually www.nashman.ca/hub/. You might have to direct to an alternate port on the webserver and map that port to the subdirectory, depending on your DNS software (IIRC, most can deal with ipaddress/subdir routes, but some can only handle routing to ipaddress:port).
If your IT department does not have direct control/ownership over your DNS routing, or your exact hosting environment, you are more or less at the mercy of your hosting provider. They may be able to set up their environment to do the same thing, or not; all you can do is ask.
EDIT: Basically you have two options left if you're hosting remotely and can't use their DNS to reroute silently.
First option: clone (copy all files from) the web layer of nashman.ca/hub as hub.mhn.co under a different root space in your hosting environment (try to keep any hooks to service-layer code over at nashman so you don't have to copy the whole vertical slice). If you must also keep the UI under the /hub/ subdirectory, you're repeating code, but you may be able to mitigate this with deploy scripts that will allow you to deploy one local copy of your codebase to various locations. This may also cost more as your hosting environment is now hosting two non-trivial sites.
Second option: host the site and/or resolve the calls on your own hardware. As long as you have a public, static IP address through your ISP, you can provide a DNS server that will be the "authoritative" server for nashman.ca and hub.mhn.co domains. Your ISP or a third party domain name registry can provide a "pass-down" route to get requests from the TLD servers down to you. Then, you can route requests to whatever IP address, port and/or subfolder you like; that can be a remote webhosting provider (as long as they don't mind JUST hosting your site) or your own webservers. This will require the hardware, and a static IP from your ISP. If you lose power to this server, your site will be unreachable until power's restored. If the IP address of your DNS server changes, your site will be unaccessible by DNS until the server that routes requests to you updates its routing table with the new IP (which can be up to 24 hours).

Resources