-2

I'm creating a website on my Raspi 3 and I want to link domains with the html folder to make it easier to access in the local network.

I want to achieve the following:

mydomain.example -> 192.168.0.1/mydomain/

test.mydomain.example -> 192.168.0.1/mydomain/test

How can I achieve this?

Patrick Mevzek
  • 9,273
  • 7
  • 29
  • 42
the_dani
  • 107
  • 1
  • You should set up different *virtualhosts* in the webserver of your rasp. From the details, I suggest to ask more on the sister-site https://raspberrypi.stackexchange.com . – peterh Aug 17 '17 at 21:38

1 Answers1

2

You don't. dnsmasq is a caching domain name forwarder/resolver not a HTTP server. But you can do this with any HTTP server.

Tom Trebicky
  • 248
  • 1
  • 2
  • 4
  • Thanks, but do you have any example how to do so? – the_dani Aug 17 '17 at 21:10
  • Visit https://redmine.lighttpd.net/projects/1/wiki/TutorialConfiguration and scroll down to "10 minutes". You can have multiple `$HTTP["host"]` entries all pointing to different document roots. This is for lighty but you can find similar examples for any HTTP server of your choice. – Tom Trebicky Aug 17 '17 at 21:15