-2

Hi Basically I have to make that

multiple domains have to point to the same machine

pero in different directories how can I do that?

i.e.

www.sito1.com must point to /root/pippobaudo

instead

www.sito2.com must point to /root/site2

which way can i do it?

Obviously in the same machine p.s i am using windows and not linux is there any script ?

I tried to insert an index.asp

following script :

"<%

dim host, pagina

host = LCase( request.servervariables("HTTP_HOST") )

SELECT CASE host

CASE "http://androideilbello.ddns.net/
pagina = "/tony/index.html"

CASE "http://iptest5/"
pagina = "/Dashboard/index.html"

CASE "www.topolino.com"
pagina = "default.htm"

CASE "www.minnie.it"
pagina = "/minnie/index.html"


END SELECT

Response.Redirect (pagina)

%>
"

but to no avail any other advice?

5
  • Generally you'll want to do this using name based virtual hosting configured on your (unspecified) HTTP server and not with ASP.
    – Quentin
    Feb 25 at 12:10
  • Thank you for your reply, but I still can't figure out how I should do it could you please send me a script or a file where you explain everything?
    – Tony Giuga
    Feb 25 at 12:28
  • 1
    You want me to point you to the right section of the manual for the unspecified HTTP server that you are using but still haven't named?
    – Quentin
    Feb 25 at 12:29
  • Yes please sir.
    – Tony Giuga
    Feb 25 at 12:32
  • @TonyGiuga he meant that in a sarcastic way. Since you haven't specified which HTTP server you are using, there's no way he can provide a specific solution to your problem. Please change the question (and tags) to what server configuration you need to do for enabling this redirection.
    – Prajwal
    Feb 25 at 13:08

1 Answer 1

0

The commenters have suggested that you will need a HTTP/web server for that. Here a suggestion: NGINX

Here two links to get you started:

You can specify server names to point to directories on your system: https://nginx.org/en/docs/http/server_names.html

So a very rudimentary example (meaning it is not a full configuration example and might not work for you in that state) would be:

server {
listen       80  default_server;

server_name  www.sito1.com;

    location / {
        root /root/pippobaudo;
    }
}

Here is a full example configuration: https://www.nginx.com/resources/wiki/start/topics/examples/full/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.