I am trying to show my local-website to the customer but it doesn't works.
The provided link redirect him to the Xampp page, not to the website folder I want to.
Couldn't find any solution online to it.
Should I put the ngrok.exe in the website-folder or what?
port is 80, 443 (as shown on xampp)
Use the -host-header option to direct to whichever virtual host on XAMPP you want to target.
ngrok http -host-header=example.dev 80
Related
for example i have a website that hosts a messenger app, it's written using Node JS on the back-end and has a server running on an obscure port (port 3455)
Currently my domain is being used to host my portfolio under a different port. the domain would be:
mydomain.com/
Is there anyway i could make it so that the app using port 3455 connects when i visit:
mydomain.com/messengerapp
even better would i be able to create a subdomain so its:
messenger.mydomain.com
You can achieve this by 301 redirection code. If you have apache server, add redirection rule to .htaccess and if you have nginx server, add redirection rule to its config file.
I have 3 sites(virtual directories) registered under the Default Web Site in IIS, those can access like below:
http://localhost/Site1
http://localhost/Site2
http://localhost/Site3
Currently I have one port number which is port 80.
I need to setup those sites with https having different port numbers, like below:
https://demo.mydomain.com:5001/Site1
https://demo.mydomain.com:5002/Site2
https://demo.mydomain.com:5003/Site3
I am new to the IIS. Can someone please help me out with the approach to solve the above scenario?
is the domain already pointing to your webserver or are you trying to achieve this on you development machine?
If the domain is already pointing to the server, you can do this IIS by adding bindings to your websites (in your case its the defaultwebsite).
You can achieve this by right-clicking the website. Here you can see "Edit Bindings". You will have to add a binding foreach port. Just click on "add" and type in the right hostname (demo.mydomain.com) and the port. You can also choose a certificate here for the https connection.
If you are trying to achieve this on your dev machine, you will also have to add your hostname to the windows hosts-file. Under "C:\Windows\System32\drivers\etc\hosts" add the line "127.0.0.1 demo.mydomain.com".
Jonathan
Hi everyone need your support with the following problem. Please do apologies if I confuse you in anyways with my explanation.
I have a add-on domain (example.com) pointed to a Godaddy Linux server, domain is also in the Godaddy same account.
The web application for "example.com" is a Laravel 5.6 based one, and the web app has 'Get' type search form which needs to be forwarded to another Windows IIS server's port with all the query strings where another web app is hosted. the action of the from will be similar to below.
Request => http://sub1.example.com/route/method?var=val1&var2=val2&var3=val3
From this point on-wards the application has to continue work from the IIS server with the subdomain, which mean I am not expecting any replies from this IIS server to the Linux server.
Its been advised to use the subdomain to mask the forwarding to the IIS server, so I did like above with sub1 sub-domain. This subdomain has to be forwarded to a server's port as I mentioned above, something similar to below.
http://sub1.example.com => http://xxx.xxx.xxx.xx:9596
I did tried with the Godaddy's default subdomain forwarding with masking, but the query strings are not being forwarded and shows "Destination Unknown" error.
In a online forum its been advised not to go with Godaddy's forwarding instead go with .htaccess to have more control.
Therefore any possible solutions or your support with the redirection with .htaccess from web application to the external web server's specific port along with the query strings would be a life saver.
Thank you in advance.
As per the GoDaddy support, the domain forwarding to a IP's port is not possible with the Shared hosting.
The support suggested to go-ahead with the VPS and configure.
Please do comment, if this is wrong statement!
I want to use something like http://localhost:6240 as entry in win hosts file.
For example when developing locally, I want when I'll open this domain dev.mysite.com the browser to navigate to http://localhost:6240
The Windows or any hosts file doesn't know anything about ports. There is no way to redirect traffic on that level.
Don't use ports, add dev.mysite.com to your hosts file and also as a host-header binding to the IIS site you want use.
You could also try to add URL-rewrite-rules and redirect request to a different site, but that is much more complicated.
I want to change my hosts file to redirect a web address to my site...
normally I would just do... ping mysite.com then in the hosts file, if the IP came out as 99.99.99.99, I'd write...
99.99.99.99 siteiwanttoredirect.com
But in this case my site is on virtual shared hosting... which means the IP I get back from the ping is the same as a few other sites and if I type that IP in the address bar, www.mysite.com won't come up. Here's a bit more details: someone who asked a question about why pinging it wouldn't give the correct IP.
So what I would like to know is... if you're on virtual shared hosting, how can you specify redirects to your site in the hosts file?
Thanks,
Matt
You cannot. With the hosts file you can change the IP address, but your shared hosting provider needs the HTTP Host header to be set up correctly -- which in your case will still be siteiwanttoredirect.com and not mysite.com . Your hosting provider will therefor not know who's site to show.
What you could do is redirect to some host you control (f.i. localhost) and run a proxy server there. If you set up Apache on your machine, with a virtual host for siteiwanttoredirect.com which does a reverse proxy to mysite.com , it should work.
This is handled via the host header of the website, and not anything on your local machine, like your hosts file.
I would make sure your host has that set up, then as long as people visit your sit via the website name, and not IP, everything should work.
On a shared host, the website you get is determined by the domain name you ask for thanks to the Host HTTP header. For this to work properly the web server needs to be configured correctly so it knows what website to serve in response to which Host request - this is usually called 'Add-on Domains' on CPanel driven shared hosting.