Office 365 document viewer - doesn't work with URL have port number - office365-apps

I am using office-365 document viewer to read the DOC/DOCX files in the browser.
The public IP of the server have port number eg: xyz.com:3453
The IP is accessible publicly and I have already cross check the Document won't open
Please help.

Related

How do you Configure Stapi CMS to Use Custom Domain Name

The default port for strapi is 1337, and default hostname is "Localhost".
I changed the hostname in the server.json file (that's inside the development folder) to "example.com" and saved that change.
However, when I start the program (by typing npm start in the terminal) although the output indicates that strapi is indeed hosting on "example.org" (and says the administration is at "example.org/admin"), upon navigating to example.org:1337, in a web browser, the page is not accessible. Yet, it is accessible when I navigate to localhost:1337.
I'm new to strapi. Any help will be appreciated. Thanks in advance!
Changing the domain name, inside of a server.json configuration file, won't likely result in your web browser being able to resolve that domain.
When your web browser tries to discover the IP address of a domain name, it first looks in your operating system's host file. If it cannot find the ip address of the domain there, it then tries to look for it at the DNS server that provides name-lookup for your local network.
DNS will typically point your domain to the public IP address of your web server and sometimes, if your web server is located on the same LAN you are, it can be tricky to teach the firewall or local DNS server how to route your browser's request within your LAN.
If you do edit your host file, to make the domain point to an internal IP address, you'll want to remove that entry later in order to access the domain when you are not on your LAN.

Access virtual host without domain pointing to it

I have a domain which pointed to an IP address (A). This IP address hosts several other websites with their domains. I now forwarded this domain to another host but I also need to access the old site which now does not have a domain pointing to it. Of course I can't just access the old site by typing the IP address into the browser. How can I do it instead?
If you're on unix, you should modify the /etc/hosts file; C:\Windows\System32\Drivers\etc\hosts if you're on Windows. (This will likely require admin privileges.)
This overrides the public DNS which would otherwise map an IP to a domain name. The change tells your machine that the old IP address is the location of example.com, where your hosts file has a line that reads:
xxx.xx.xx.xx example.com www.example.com
And xxx.xx.xx.xx is your old server's IP.
Remember to comment out or remove the line when you're done! You may confuse your future self, otherwise!
"Host" Header in HTTP is used to identify which of the many websites to visit on a virtual hosting web server. Virtual hosting is when a single IP address hosts websites(http content) for many different domains.
For eg. "Host: www.example.com"
You will find such a header in all virtual hosting websites.
Use an extension like Tamper chrome to add Host to the header. Specify your domain name in this header.
Illustration -
The university in which I studied uses virtual hosting, hence using Host header is imperative.
See the following image.
Now, if I type the IP address (obtained from ping utility) directly. You see a default page.
Now If I use tamper chrome extension to add Host header.
We can see that it lands on a page on bvcoend.ac.in domain.
I have to polish it further so that the landing page is the home page, but this process captures the essence of Host header used in virtual hosting.
Update : Using Fiddler to modify Host header seems to work fine for me, somehow tamper chrome isn't doing it's job perfectly (miss the good old Firefox Tamper data days).

How to make local running yii2 CRUD application available online?

I have developed Yii2 CRUD application using models, controllers and views. It is used locally on PC. I wanted the users to use it online.
For eg. I have www.example.com and I wanted to make this yii2 CRUD application available on this site. What are the steps?
Your question is not very specific, therefore you haven't received an answer. I'm assuming you are asking about how to use your local PC as the server for an online site. Otherwise please clarify your question.
You will need to do the following steps:
Point the domain name to the public IP address behind which your local PC is sitting. You can find that by going here: http://whatismyipaddress.com/
In your router you need to set up port forwarding (NAT rules) for port 80 (or 443 if using https) to your computer's local IP address.
Depending on your Apache configuration (or whatever webserver you are using) you need to ensure it serves the right website. This is too broad a subject that I can give you any details here.
Note that you are now opening up your local computer to the Internet and hence you should be aware of the security implications it has.

Redirect/rewrite to different internal IIS sites using query string

EDIT: Ugh I forgot to put this on Server Fault...
I have an Azure VM that is hosting a web application.
The application will be accessible via the VM's IP address:
http://191.238.112.62
I want to be able to use query strings to redirect to completely different sites that are within the local IIS. For example:
http://191.238.112.62/?site=1
would redirect to
www.site1.com
The way I have structured IIS can be seen below:
Each site has an entry in the systems host file.
127.0.0.1 wwww.site1.com
127.0.0.1 wwww.site2.com
127.0.0.1 wwww.site3.com
There is likely a better way to achieve what I am going for here so any pointers would be greatly appreciated.
Thanks.
Here is how I would do it. Not sure why you want to use query strings for this as IIS is made to do that if you configure it properly.
In your DNS server register all your websites to point to that IP. This is for when you go live. For development the hosts file is a good solution.
When you create the websites add a Host header like below
Now try loading any website by their full name
http://www.site1.com
http://www.site2.com
http://www.site3.com
Here is more info about IIS host headers.
Again, when you go live make sure you have the DNS set up for all the websites to point to the IP address of your server.
Hope this helps.
Edit based on comment:
Right, here is how I solved this in the past.
You can do all this with the hosts file but it's less painful if you have a proper DNS server to resolve the names.
The basic idea is to use slightly different URLs for development on the local machine.
All devs would have site1.com point to the IP of the shared server and site1.com.local point to 127.0.0.1. So a hosts file on a developer machine would look something like:
191.238.112.62 www.site1.com
127.0.0.1 www.site1.com.local
On all development machines you need to make sure you have the .local host header for all sites.
On the shared server you just need to add the right host headers and no hosts file changes. It's actually a bad idea to change the server hosts file.

How to locate device on network?

CodeLath, maker of the TonidoPlug walwart, provides a web server to locate the Plug on the LAN:
http://www.tonidoplug.com/ip/
I'm curious to know how a script located on some web servers on the Net manages to find the IP address of a device located on my LAN that uses the non-routable, private address plan 192.168.x.x.
If it fails, the user can enter the MAC address, and the web script will try again to find it.
Does someone have an idea how it's done?
Thank you.
I think the devices "phone home" to TonidoPlug's website with their MAC and IP addresses, and this script just queries the database for a matching device...
If what you want is a replica of your SQLEXPRESS/MDF local file- on a remote server (SQL Server 2005), you can right click in the "Server Explorer" on your db.mdf file and press "Publish to provider...". You can choose a variety of compatibilities with SQL Server 2005, 2008, etc. The output is a .sql query file .