laravel - Create wildcard subdomain in xampp localhost -


i trying create wildcard subdomain in xampp local development of laravel project. far able change hosts file , create virtual host domain name.

here hosts file

127.0.0.1   localhost 127.0.1.1   lalit-inspiron-3537  127.0.0.1 mysite.local   # following lines desirable ipv6 capable hosts ::1     ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02:  :2 ip6-allrouters 

i have enabled virtual hosts in httpd.conf file

here httpd-vhosts.conf file

# virtual hosts # # required modules: mod_log_config  # if want maintain multiple domains/hostnames on # machine can setup virtualhost containers them. configurations # use name-based virtual hosts server doesn't need worry # ip addresses. indicated asterisks in directives below. # # please see documentation @  # <url:http://httpd.apache.org/docs/2.4/vhosts/> # further details before try setup virtual hosts. # # may use command line option '-s' verify virtual host # configuration.  # # virtualhost example: # apache directive may go virtualhost container. # first virtualhost section used requests not # match servername or serveralias in <virtualhost> block. # <virtualhost *:80>     serveradmin webmaster@dummy-host.example.com     documentroot "/opt/lampp/docs/dummy-host.example.com"     servername dummy-host.example.com     serveralias www.dummy-host.example.com     errorlog "logs/dummy-host.example.com-error_log"     customlog "logs/dummy-host.example.com-access_log" common </virtualhost>  <virtualhost *:80>     serveradmin webmaster@dummy-host2.example.com     documentroot "/opt/lampp/docs/dummy-host2.example.com"     servername dummy-host2.example.com     errorlog "logs/dummy-host2.example.com-error_log"     customlog "logs/dummy-host2.example.com-access_log" common </virtualhost>  <virtualhost *:80>     documentroot "/opt/lampp/htdocs/mysite/public"     servername mysite.local     serveralias *.mysite.local     <directory "/opt/lampp/htdocs/mysite/public">         order allow,deny         allow     </directory> </virtualhost> 

i can access laravel project @ mysite.local. when try access subdomain.mysite.local following error

this site can’t reached  subdomain.mysite.local’s server dns address not found. try: checking connection checking proxy, firewall, , dns configuration err_name_not_resolved 

can please me this?

i found solution. turns out cannot use .local our domain name used avahi-daemon. changed .local domain names,

host file

127.0.0.1   localhost 127.0.1.1   lalit-inspiron-3537  127.0.0.1 mysite.dev 

httpd-vhosts.conf file

<virtualhost *:80>     documentroot "/opt/lampp/htdocs/mysite/public"     servername mysite.local     serveralias *.mysite.local     <directory "/opt/lampp/htdocs/mysite/public">         order allow,deny         allow     </directory> </virtualhost> 

and it's working perfectly.


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -